From 982c6e65d2c9b728e76abe01203035eea04ae69b Mon Sep 17 00:00:00 2001 From: Alone Date: Thu, 20 Feb 2025 00:14:10 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9D=84=EF=B8=8F=20fix=20for=20climate=20stat?= =?UTF-8?q?e=20(#2376)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom_components/xiaomi_miot/climate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/xiaomi_miot/climate.py b/custom_components/xiaomi_miot/climate.py index f7ebb3259..97684458b 100644 --- a/custom_components/xiaomi_miot/climate.py +++ b/custom_components/xiaomi_miot/climate.py @@ -247,7 +247,7 @@ def set_state(self, data: dict): self._attr_is_on = val if val in [False, 0]: self._attr_hvac_mode = HVACMode.OFF - elif self._attr_hvac_mode in [None, HVACMode.OFF]: + elif val and self._attr_hvac_mode in [None, HVACMode.OFF]: self._attr_hvac_mode = HVACMode.AUTO self._attr_state = self._attr_hvac_mode