Procházet zdrojové kódy

Climate: if no hvac_mode dps, return hvac_mode of None.

Was returning Auto, on the assumption that a valid mode is expected, but
this results in a Mode select dropdown being created in the new climate
UI, with no contents to select from.  Returning None seems to be expected
in this case.

Issue #1144
Jason Rumney před 2 roky
rodič
revize
82fa229ee7
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      custom_components/tuya_local/climate.py

+ 1 - 1
custom_components/tuya_local/climate.py

@@ -312,7 +312,7 @@ class TuyaLocalClimate(TuyaLocalEntity, ClimateEntity):
     def hvac_mode(self):
         """Return current HVAC mode."""
         if self._hvac_mode_dps is None:
-            return HVACMode.AUTO
+            return None
         hvac_mode = self._hvac_mode_dps.get_value(self._device)
         try:
             return HVACMode(hvac_mode) if hvac_mode else None