Explorar o código

Allow for non-existant config key.

CONF_PERSIST is optional, and only just added so existing configs will not
have it.
Jason Rumney %!s(int64=4) %!d(string=hai) anos
pai
achega
9a6a28013b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      custom_components/tuya_local/device.py

+ 1 - 1
custom_components/tuya_local/device.py

@@ -287,7 +287,7 @@ def setup_device(hass: HomeAssistant, config: dict):
         config[CONF_DEVICE_ID],
         config[CONF_HOST],
         config[CONF_LOCAL_KEY],
-        config[CONF_PERSIST],
+        config.get(CONF_PERSIST, False),
         hass,
     )