From 5f664acb4fe1f6f7c1870df97155cb4cba08f6b4 Mon Sep 17 00:00:00 2001 From: John Arild Berentsen Date: Wed, 31 Aug 2016 22:30:44 +0200 Subject: [PATCH] unit fix (#3083) --- homeassistant/components/climate/zwave.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/climate/zwave.py b/homeassistant/components/climate/zwave.py index b29c6a92b63..63dddaf466b 100755 --- a/homeassistant/components/climate/zwave.py +++ b/homeassistant/components/climate/zwave.py @@ -12,6 +12,7 @@ from homeassistant.components.climate import ClimateDevice from homeassistant.components.zwave import ( ATTR_NODE_ID, ATTR_VALUE_ID, ZWaveDeviceEntity) from homeassistant.components import zwave +from homeassistant.const import (TEMP_CELSIUS, TEMP_FAHRENHEIT) _LOGGER = logging.getLogger(__name__) @@ -186,7 +187,13 @@ class ZWaveClimate(ZWaveDeviceEntity, ClimateDevice): @property def unit_of_measurement(self): """Return the unit of measurement.""" - return self._unit + unit = self._unit + if unit == 'C': + return TEMP_CELSIUS + elif unit == 'F': + return TEMP_FAHRENHEIT + else: + return self._unit @property def current_temperature(self):