Skip to content

Commit

Permalink
dreamevacuum: don't crash on missing property values (#1831)
Browse files Browse the repository at this point in the history
Do not crash if a dreamevacuum property response does not contain a value.
  • Loading branch information
rytilahti committed Oct 4, 2023
1 parent 76808d8 commit 81d28ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miio/integrations/dreame/vacuum/dreamevacuum_miot.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ def status(self) -> DreameVacuumStatus:

return DreameVacuumStatus(
{
prop["did"]: prop["value"] if prop["code"] == 0 else None
prop["did"]: prop.get("value") if prop.get("code") == 0 else None
for prop in self.get_properties_for_mapping(max_properties=10)
},
self.model,
Expand Down

0 comments on commit 81d28ec

Please sign in to comment.