Преглед изворни кода

config_flow: allow "exists" attribute to be missing when reading

Issue #1054
Jason Rumney пре 1 година
родитељ
комит
4bb067c91b
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      custom_components/tuya_local/config_flow.py

+ 1 - 1
custom_components/tuya_local/config_flow.py

@@ -324,7 +324,7 @@ class ConfigFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
         device_list = []
         device_list = []
         for key in self.__cloud_devices.keys():
         for key in self.__cloud_devices.keys():
             device_entry = self.__cloud_devices[key]
             device_entry = self.__cloud_devices[key]
-            if device_entry["exists"]:
+            if device_entry.get("exists"):
                 continue
                 continue
             if device_entry[CONF_LOCAL_KEY] != "":
             if device_entry[CONF_LOCAL_KEY] != "":
                 if device_entry["online"]:
                 if device_entry["online"]: