From 81d28ecefd126020649c728141b15d267a24b7eb Mon Sep 17 00:00:00 2001 From: Teemu R Date: Thu, 5 Oct 2023 01:26:40 +0200 Subject: [PATCH] dreamevacuum: don't crash on missing property values (#1831) Do not crash if a dreamevacuum property response does not contain a value. --- 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,