فهرست منبع

climate: always return OFF for action when the mode is off.

This should allow simplification of some configs, as the off switch
no longer needs to be considered in the config.

This may also free up the constraint to be used for more complex reporting.
Jason Rumney 1 سال پیش
والد
کامیت
0e55258aa0
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      custom_components/tuya_local/climate.py

+ 3 - 0
custom_components/tuya_local/climate.py

@@ -314,6 +314,9 @@ class TuyaLocalClimate(TuyaLocalEntity, ClimateEntity):
         """Return the current HVAC action."""
         if self._hvac_action_dps is None:
             return None
+        if self.hvac_mode is HVACMode.OFF:
+            return HVACAction.OFF
+
         action = self._hvac_action_dps.get_value(self._device)
         try:
             return HVACAction(action) if action else None