climate
entity: Make min/max setpoints optional, do not validate using assumed setpoint ranges
#1152
Replies: 4 comments
-
I think I found where this was introduced. |
Beta Was this translation helpful? Give feedback.
-
I like the approach as it gets us out of the current issue and the work for each integration is minimal or none if it's defaulting to the base class implementation. Two notes. a) Right now the UI limits may be modified by the user by using "customize" in configuration.yaml |
Beta Was this translation helpful? Give feedback.
-
Branch that prototypes the changes for the base climate entity temperature that are being recommended. Note: The zwave_js climate.py also need to be updated to return None instead of DEFAULT_MIN_TEMP and DEFAULT_MAX_TEMP .. |
Beta Was this translation helpful? Give feedback.
-
With this we seem to cure a symptom by making these optional for the validation. Perhaps it's not a bad suggestion to make the validation optional (especially for generic integrations such as zwave) but the background for the issue seems incorrect. |
Beta Was this translation helpful? Give feedback.
-
I'll use thermostats as an example, but the principle applies to all setpoint types of climate devices.
Background
When changing setpoints of thermostats, recent releases (I'm not clear which PR did it) validate that the new setpoint lies between the min and max, and don't accept any setpoints outside of this range. For some devices however, it is not possible to determine the range of valid setpoints, so the defaults of 7...35°C are chosen, preventing users from setting valid setpoints outside of this range.
Some examples are Z-Wave devices which implement
Thermostat Setpoint CC
version 1 or 2, which are still pretty common.This has been reported in home-assistant/core#123612
While validating setpoints sounds reasonable, enforcing them when the range of valid values is assumed seems wrong however. In addition, this violates a Z-Wave certification requirement:
Yes, I'm aware that HA does not model its entities after a single protocol, but in this case the Z-Wave requirements follow common sense in my opinion: When the range is not known, leave the choice to the user.
Proposal
min_temp
,min_humidity
,max_temp
andmax_humidity
optional.setpoint >= min
whenmin
is unknownsetpoint <= max
whenmax
is unknown.max_temp < DEFAULT_MIN_TEMP
.Beta Was this translation helpful? Give feedback.
All reactions