From 06908734d60e5536d3684de91d3205e3000c7bda Mon Sep 17 00:00:00 2001 From: Tony Roberts Date: Tue, 14 Nov 2023 13:15:08 +0000 Subject: [PATCH] Set hvac action to idle unless actually set to off Fixes #3 --- custom_components/wundasmart/climate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/wundasmart/climate.py b/custom_components/wundasmart/climate.py index 42dee57..2e5abe8 100644 --- a/custom_components/wundasmart/climate.py +++ b/custom_components/wundasmart/climate.py @@ -227,7 +227,8 @@ def __set_hvac_state(self): self._attr_hvac_action = ( HVACAction.PREHEATING if ((flags & (0x80 | 0x20)) == (0x80 | 0x20)) else HVACAction.HEATING if flags & 0x20 - else HVACAction.OFF + else HVACAction.OFF if flags & 0x4 + else HVACAction.IDLE ) except (ValueError, TypeError): _LOGGER.warning(f"Unexpected 'temp_pre' value '{state['temp_pre']}' for {self._attr_name}")