Просмотр исходного кода

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

Issue #1054
Jason Rumney 1 год назад
Родитель
Сommit
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 = []
         for key in self.__cloud_devices.keys():
             device_entry = self.__cloud_devices[key]
-            if device_entry["exists"]:
+            if device_entry.get("exists"):
                 continue
             if device_entry[CONF_LOCAL_KEY] != "":
                 if device_entry["online"]: