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

🐛 Correct inclusion check #246

Merged
merged 1 commit into from
Sep 8, 2024
Merged
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
2 changes: 1 addition & 1 deletion custom_components/aquarea/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def target_temperature_message_received(message):
f"{self._climate_type()} Received target temperature for {self.zone_id}: {self._attr_target_temperature}"
)
if self._attr_min_temp != None and self._attr_max_temp != None:
if self._attr_target_temperature not in range(self._attr_min_temp, self._attr_max_temp):
if self._attr_target_temperature < self._attr_min_temp or self._attr_target_temperature > self._attr_max_temp:
# when reaching that point, maybe we should set a wider range to avoid blocking user?
_LOGGER.warn(f"{self._climate_type()} Target temperature is not within expected range, this is suspicious. {self._attr_target_temperature} should be within [{self._attr_min_temp},{self._attr_max_temp}]")
self.async_write_ha_state()
Expand Down
Loading