mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
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.
This commit is contained in:
parent
3658cdba4c
commit
cf45c67055
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user