mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
unit fix (#3083)
This commit is contained in:
parent
e5b6592870
commit
5f664acb4f
@ -12,6 +12,7 @@ from homeassistant.components.climate import ClimateDevice
|
|||||||
from homeassistant.components.zwave import (
|
from homeassistant.components.zwave import (
|
||||||
ATTR_NODE_ID, ATTR_VALUE_ID, ZWaveDeviceEntity)
|
ATTR_NODE_ID, ATTR_VALUE_ID, ZWaveDeviceEntity)
|
||||||
from homeassistant.components import zwave
|
from homeassistant.components import zwave
|
||||||
|
from homeassistant.const import (TEMP_CELSIUS, TEMP_FAHRENHEIT)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -186,7 +187,13 @@ class ZWaveClimate(ZWaveDeviceEntity, ClimateDevice):
|
|||||||
@property
|
@property
|
||||||
def unit_of_measurement(self):
|
def unit_of_measurement(self):
|
||||||
"""Return the unit of measurement."""
|
"""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
|
@property
|
||||||
def current_temperature(self):
|
def current_temperature(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user