mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-08-05 23:08:55 +08:00
fix: set the temperature limit
This commit is contained in:
@ -115,9 +115,6 @@ class WaterHeater(MIoTServiceEntity, WaterHeaterEntity):
|
|||||||
# temperature
|
# temperature
|
||||||
if prop.name == 'temperature':
|
if prop.name == 'temperature':
|
||||||
if isinstance(prop.value_range, dict):
|
if isinstance(prop.value_range, dict):
|
||||||
self._attr_min_temp = prop.value_range['min']
|
|
||||||
self._attr_max_temp = prop.value_range['max']
|
|
||||||
self._attr_precision = prop.value_range['step']
|
|
||||||
if (
|
if (
|
||||||
self._attr_temperature_unit is None
|
self._attr_temperature_unit is None
|
||||||
and prop.external_unit
|
and prop.external_unit
|
||||||
@ -130,6 +127,9 @@ class WaterHeater(MIoTServiceEntity, WaterHeaterEntity):
|
|||||||
self.entity_id)
|
self.entity_id)
|
||||||
# target-temperature
|
# target-temperature
|
||||||
if prop.name == 'target-temperature':
|
if prop.name == 'target-temperature':
|
||||||
|
self._attr_min_temp = prop.value_range['min']
|
||||||
|
self._attr_max_temp = prop.value_range['max']
|
||||||
|
self._attr_precision = prop.value_range['step']
|
||||||
if self._attr_temperature_unit is None and prop.external_unit:
|
if self._attr_temperature_unit is None and prop.external_unit:
|
||||||
self._attr_temperature_unit = prop.external_unit
|
self._attr_temperature_unit = prop.external_unit
|
||||||
self._attr_supported_features |= (
|
self._attr_supported_features |= (
|
||||||
|
Reference in New Issue
Block a user