Skip to content

Commit

Permalink
dreamevacuum: don't crash on missing property values
Browse files Browse the repository at this point in the history
  • Loading branch information
rytilahti committed Sep 24, 2023
1 parent 8f567fe commit dc96cbf
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 dc96cbf

Please sign in to comment.