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

Fix issue with GPCV lock support.

An typo in use of the constant caused the lock to fail to initialise if it reached the GPCV condition. Since that was last in the list, it went undetected.
Jason Rumney 5 лет назад
Родитель
Сommit
ef71aedfd6
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      custom_components/goldair_climate/lock.py

+ 1 - 1
custom_components/goldair_climate/lock.py

@@ -27,7 +27,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
         data[CONF_CHILD_LOCK] = GoldairDehumidifierChildLock(device)
     elif discovery_info[CONF_TYPE] == CONF_TYPE_FAN:
         raise ValueError("Goldair fans do not support child lock.")
-    elif discovery_info[CONF_TYPE] == CONF_GPCV_HEATER:
+    elif discovery_info[CONF_TYPE] == CONF_TYPE_GPCV_HEATER:
         data[CONF_CHILD_LOCK] = GoldairGPCVHeaterChildLock(device)
 
     if CONF_CHILD_LOCK in data: