Преглед изворни кода

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 пре 2 година
родитељ
комит
82fa229ee7
1 измењених фајлова са 1 додато и 1 уклоњено
  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