mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Plugwise: limit _attr_max_temp to 35.0 for thermostats that report a max of 100. (#104324)
This commit is contained in:
parent
02e09ed4cc
commit
0996c82c02
@ -67,7 +67,7 @@ class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity):
|
|||||||
self._attr_preset_modes = presets
|
self._attr_preset_modes = presets
|
||||||
|
|
||||||
self._attr_min_temp = self.device["thermostat"]["lower_bound"]
|
self._attr_min_temp = self.device["thermostat"]["lower_bound"]
|
||||||
self._attr_max_temp = self.device["thermostat"]["upper_bound"]
|
self._attr_max_temp = min(self.device["thermostat"]["upper_bound"], 35.0)
|
||||||
# Ensure we don't drop below 0.1
|
# Ensure we don't drop below 0.1
|
||||||
self._attr_target_temperature_step = max(
|
self._attr_target_temperature_step = max(
|
||||||
self.device["thermostat"]["resolution"], 0.1
|
self.device["thermostat"]["resolution"], 0.1
|
||||||
|
@ -33,7 +33,7 @@ async def test_adam_climate_entity_attributes(
|
|||||||
assert state.attributes["supported_features"] == 17
|
assert state.attributes["supported_features"] == 17
|
||||||
assert state.attributes["temperature"] == 21.5
|
assert state.attributes["temperature"] == 21.5
|
||||||
assert state.attributes["min_temp"] == 0.0
|
assert state.attributes["min_temp"] == 0.0
|
||||||
assert state.attributes["max_temp"] == 99.9
|
assert state.attributes["max_temp"] == 35.0
|
||||||
assert state.attributes["target_temp_step"] == 0.1
|
assert state.attributes["target_temp_step"] == 0.1
|
||||||
|
|
||||||
state = hass.states.get("climate.zone_thermostat_jessie")
|
state = hass.states.get("climate.zone_thermostat_jessie")
|
||||||
@ -50,7 +50,7 @@ async def test_adam_climate_entity_attributes(
|
|||||||
assert state.attributes["preset_mode"] == "asleep"
|
assert state.attributes["preset_mode"] == "asleep"
|
||||||
assert state.attributes["temperature"] == 15.0
|
assert state.attributes["temperature"] == 15.0
|
||||||
assert state.attributes["min_temp"] == 0.0
|
assert state.attributes["min_temp"] == 0.0
|
||||||
assert state.attributes["max_temp"] == 99.9
|
assert state.attributes["max_temp"] == 35.0
|
||||||
assert state.attributes["target_temp_step"] == 0.1
|
assert state.attributes["target_temp_step"] == 0.1
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user