Răsfoiți Sursa

Merge upstream 'homeassistant-goldair-climate'

0.1.1b0 contains merged GECO and GPCV heater support.
Auto-detection is slightly simplified, otherwise there are just mechanical changes.
Jason Rumney 5 ani în urmă
părinte
comite
a419ce687e

+ 1 - 1
custom_components/tuya_local/__init__.py

@@ -35,7 +35,7 @@ from .config_flow import ConfigFlowHandler
 
 _LOGGER = logging.getLogger(__name__)
 
-VERSION = "0.1.0"
+VERSION = "0.1.1"
 
 CONFIG_SCHEMA = vol.Schema(
     {DOMAIN: vol.All(cv.ensure_list, [vol.Schema(individual_config_schema())])},

+ 6 - 8
custom_components/tuya_local/device.py

@@ -89,18 +89,16 @@ class TuyaLocalDevice(object):
         _LOGGER.debug(f"Inferring device type from cached state: {cached_state}")
         if "1" not in cached_state:
             return CONF_TYPE_KOGAN_HEATER
-        if "5" in cached_state:
-            if "3" in cached_state:
-                if "7" in cached_state:
-                    return CONF_TYPE_GPCV_HEATER
-                else:
-                    return CONF_TYPE_GECO_HEATER
-            else:
-                return CONF_TYPE_DEHUMIDIFIER
+        if "5" in cached_state and "3" not in cached_state:
+            return CONF_TYPE_DEHUMIDIFIER
         if "8" in cached_state:
             return CONF_TYPE_FAN
         if "106" in cached_state:
             return CONF_TYPE_HEATER
+        if "7" in cached_state:
+            return CONF_TYPE_GPCV_HEATER
+        if "3" in cached_state:
+            return CONF_TYPE_GECO_HEATER
 
         return None