Fix unknown unit of measurement for hvac and thermostat component (#2816)

* Fix unknown unit of measurement for hvac and thermostat component

* Simplify
This commit is contained in:
John Arild Berentsen 2016-08-14 10:19:54 +02:00 committed by Paulus Schoutsen
parent 12ce3deffc
commit c16a29b930
2 changed files with 6 additions and 4 deletions

View file

@ -120,6 +120,7 @@ class ZWaveHvac(ZWaveDeviceEntity, HvacDevice):
# Current Temp
for value in self._node.get_values(
class_id=COMMAND_CLASS_SENSOR_MULTILEVEL).values():
if value.label == 'Temperature':
self._current_temperature = int(value.data)
self._unit = value.units
# Fan Mode

View file

@ -91,6 +91,7 @@ class ZWaveThermostat(zwave.ZWaveDeviceEntity, ThermostatDevice):
# current Temp
for _, value in self._node.get_values_for_command_class(
COMMAND_CLASS_SENSOR_MULTILEVEL).items():
if value.label == 'Temperature':
self._current_temperature = int(value.data)
self._unit = value.units