From dc96cbf718d5fefb0aa98835c15ae93f38ff8660 Mon Sep 17 00:00:00 2001 From: Teemu Rytilahti Date: Sun, 24 Sep 2023 17:15:04 +0300 Subject: [PATCH] dreamevacuum: don't crash on missing property values --- miio/integrations/dreame/vacuum/dreamevacuum_miot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miio/integrations/dreame/vacuum/dreamevacuum_miot.py b/miio/integrations/dreame/vacuum/dreamevacuum_miot.py index 50ab4c1f9..75c9dbb12 100644 --- a/miio/integrations/dreame/vacuum/dreamevacuum_miot.py +++ b/miio/integrations/dreame/vacuum/dreamevacuum_miot.py @@ -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,