Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase Z-Wave fallback thermostat range to 0-50 C #128543

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions homeassistant/components/zwave_js/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
ATTR_HVAC_MODE,
ATTR_TARGET_TEMP_HIGH,
ATTR_TARGET_TEMP_LOW,
DEFAULT_MAX_TEMP,
DEFAULT_MIN_TEMP,
DOMAIN as CLIMATE_DOMAIN,
PRESET_NONE,
ClimateEntity,
Expand Down Expand Up @@ -421,7 +419,7 @@ def extra_state_attributes(self) -> dict[str, str] | None:
@property
def min_temp(self) -> float:
"""Return the minimum temperature."""
min_temp = DEFAULT_MIN_TEMP
min_temp = 0.0 # Not using DEFAULT_MIN_TEMP to allow wider range
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make it -50 to support freezers?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just speaking hypothetically. Not sure if that will ever be an issue, and if it is, we could fix it then. Because right now, 0° seems more reasonable for those users with V1 thermostats.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

base_unit: str = UnitOfTemperature.CELSIUS
try:
temp = self._setpoint_value_or_raise(self._current_mode_setpoint_enums[0])
Expand All @@ -437,7 +435,7 @@ def min_temp(self) -> float:
@property
def max_temp(self) -> float:
"""Return the maximum temperature."""
max_temp = DEFAULT_MAX_TEMP
max_temp = 50.0 # Not using DEFAULT_MAX_TEMP to allow wider range
base_unit: str = UnitOfTemperature.CELSIUS
try:
temp = self._setpoint_value_or_raise(self._current_mode_setpoint_enums[0])
Expand Down
4 changes: 2 additions & 2 deletions tests/components/zwave_js/test_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,8 @@ async def test_thermostat_heatit_z_trm2fx(
| ClimateEntityFeature.TURN_OFF
| ClimateEntityFeature.TURN_ON
)
assert state.attributes[ATTR_MIN_TEMP] == 7
assert state.attributes[ATTR_MAX_TEMP] == 35
assert state.attributes[ATTR_MIN_TEMP] == 0
assert state.attributes[ATTR_MAX_TEMP] == 50

# Try switching to external sensor
event = Event(
Expand Down
Loading