unit fix (#3083)
This commit is contained in:
parent
e5b6592870
commit
5f664acb4f
1 changed files with 8 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue