From d9576fcb1811118995f39bc5d1f39dfa2e648261 Mon Sep 17 00:00:00 2001 From: Phil Lavin Date: Mon, 17 Jul 2017 10:16:07 +0100 Subject: [PATCH 1/2] 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 --- homeassistant/components/climate/maxcube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/climate/maxcube.py b/homeassistant/components/climate/maxcube.py index 9d6c1bbab5bec..cf0449af567c4 100644 --- a/homeassistant/components/climate/maxcube.py +++ b/homeassistant/components/climate/maxcube.py @@ -140,7 +140,7 @@ def update(self): def map_temperature_max_hass(temperature): """Map Temperature from MAX! to HASS.""" if temperature is None: - return STATE_UNKNOWN + return 0.0 return temperature From 1e2999cfba96c3240e4c8449a78fe0f8ed29986c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 17 Jul 2017 23:13:41 +0200 Subject: [PATCH 2/2] Fix lint issue --- homeassistant/components/climate/maxcube.py | 1 - 1 file changed, 1 deletion(-) diff --git a/homeassistant/components/climate/maxcube.py b/homeassistant/components/climate/maxcube.py index cf0449af567c4..271616daf8b04 100644 --- a/homeassistant/components/climate/maxcube.py +++ b/homeassistant/components/climate/maxcube.py @@ -10,7 +10,6 @@ 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__)