From cf45c670556d4d61b022b171f42ca3a6226f8747 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 23 Dec 2024 05:26:11 +0100 Subject: [PATCH] Fix TypeError in maxcube climate action inference logic (#133853) The maxcube-api library initializes the valve_position as a None value, so that during initialization if the cube does not respond quickly enough the comparison fails to compare a None-Type to an integer. --- homeassistant/components/maxcube/climate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/maxcube/climate.py b/homeassistant/components/maxcube/climate.py index da5a9f34dda..296da4f0ab4 100644 --- a/homeassistant/components/maxcube/climate.py +++ b/homeassistant/components/maxcube/climate.py @@ -171,8 +171,8 @@ class MaxCubeClimate(ClimateEntity): else: return None - # Assume heating when valve is open - if valve > 0: + # Assume heating when valve is open. + if valve: return HVACAction.HEATING return HVACAction.OFF if self.hvac_mode == HVACMode.OFF else HVACAction.IDLE