From dcd6f7a29e96d2335c8f0c19774b78697e2fe7af Mon Sep 17 00:00:00 2001 From: Phil Lavin Date: Mon, 17 Jul 2017 22:34:38 +0100 Subject: [PATCH] Return a 0 temperature value when none is found (#8518) * Return a 0 temperature value when none is found It's well documented that these TRVs will only return the current temperature for a short time after the actuator has moved. This means that, usually, they will not return the current temperature. Setting a non-value here causes errors in the logs and for the TRV to not show on the dashboard at all * Fix lint issue --- homeassistant/components/climate/maxcube.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/climate/maxcube.py b/homeassistant/components/climate/maxcube.py index 9d6c1bbab5b..271616daf8b 100644 --- a/homeassistant/components/climate/maxcube.py +++ b/homeassistant/components/climate/maxcube.py @@ -10,7 +10,6 @@ import logging from homeassistant.components.climate import ClimateDevice, STATE_AUTO from homeassistant.components.maxcube import MAXCUBE_HANDLE from homeassistant.const import TEMP_CELSIUS, ATTR_TEMPERATURE -from homeassistant.const import STATE_UNKNOWN _LOGGER = logging.getLogger(__name__) @@ -140,7 +139,7 @@ class MaxCubeClimate(ClimateDevice): def map_temperature_max_hass(temperature): """Map Temperature from MAX! to HASS.""" if temperature is None: - return STATE_UNKNOWN + return 0.0 return temperature