Skip to content

Commit

Permalink
fix: set the temperature limit
Browse files Browse the repository at this point in the history
  • Loading branch information
topsworld committed Dec 17, 2024
1 parent bf43537 commit 1fd5e8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/xiaomi_home/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ def __init__(
# temperature
if prop.name == 'temperature':
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 (
self._attr_temperature_unit is None
and prop.external_unit
Expand All @@ -130,6 +127,9 @@ def __init__(
self.entity_id)
# 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:
self._attr_temperature_unit = prop.external_unit
self._attr_supported_features |= (
Expand Down

0 comments on commit 1fd5e8e

Please sign in to comment.