From 82c599a7494931eb5e50863797ae764db168d856 Mon Sep 17 00:00:00 2001 From: John Arild Berentsen Date: Fri, 24 Mar 2017 07:50:36 +0100 Subject: [PATCH] current temp could be none (#6759) --- homeassistant/components/climate/zwave.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/climate/zwave.py b/homeassistant/components/climate/zwave.py index 4aaea884816..74fadb8c5fd 100755 --- a/homeassistant/components/climate/zwave.py +++ b/homeassistant/components/climate/zwave.py @@ -112,8 +112,9 @@ class ZWaveClimate(ZWaveDeviceEntity, ClimateDevice): _LOGGER.debug("Setpoint is 0, setting default to " "current_temperature=%s", self._current_temperature) - self._target_temperature = ( - round((float(self._current_temperature)), 1)) + if self._current_temperature is not None: + self._target_temperature = ( + round((float(self._current_temperature)), 1)) else: self._target_temperature = round( (float(self.values.primary.data)), 1)