mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
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:
parent
dc68f61261
commit
bb14239d91
@ -120,8 +120,9 @@ class ZWaveHvac(ZWaveDeviceEntity, HvacDevice):
|
|||||||
# Current Temp
|
# Current Temp
|
||||||
for value in self._node.get_values(
|
for value in self._node.get_values(
|
||||||
class_id=COMMAND_CLASS_SENSOR_MULTILEVEL).values():
|
class_id=COMMAND_CLASS_SENSOR_MULTILEVEL).values():
|
||||||
self._current_temperature = int(value.data)
|
if value.label == 'Temperature':
|
||||||
self._unit = value.units
|
self._current_temperature = int(value.data)
|
||||||
|
self._unit = value.units
|
||||||
# Fan Mode
|
# Fan Mode
|
||||||
for value in self._node.get_values(
|
for value in self._node.get_values(
|
||||||
class_id=COMMAND_CLASS_THERMOSTAT_FAN_MODE).values():
|
class_id=COMMAND_CLASS_THERMOSTAT_FAN_MODE).values():
|
||||||
|
@ -91,8 +91,9 @@ class ZWaveThermostat(zwave.ZWaveDeviceEntity, ThermostatDevice):
|
|||||||
# current Temp
|
# current Temp
|
||||||
for _, value in self._node.get_values_for_command_class(
|
for _, value in self._node.get_values_for_command_class(
|
||||||
COMMAND_CLASS_SENSOR_MULTILEVEL).items():
|
COMMAND_CLASS_SENSOR_MULTILEVEL).items():
|
||||||
self._current_temperature = int(value.data)
|
if value.label == 'Temperature':
|
||||||
self._unit = value.units
|
self._current_temperature = int(value.data)
|
||||||
|
self._unit = value.units
|
||||||
|
|
||||||
# operation state
|
# operation state
|
||||||
for _, value in self._node.get_values(
|
for _, value in self._node.get_values(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user