Parcourir la source

Allow for non-existant config key.

CONF_PERSIST is optional, and only just added so existing configs will not
have it.
Jason Rumney il y a 4 ans
Parent
commit
9a6a28013b
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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_DEVICE_ID],
         config[CONF_HOST],
         config[CONF_HOST],
         config[CONF_LOCAL_KEY],
         config[CONF_LOCAL_KEY],
-        config[CONF_PERSIST],
+        config.get(CONF_PERSIST, False),
         hass,
         hass,
     )
     )