Skip to content

Commit

Permalink
⚙️ Display warning when target temperature seems out of range
Browse files Browse the repository at this point in the history
This may help at some point for #220
  • Loading branch information
kamaradclimber committed Jul 7, 2024
1 parent 172dc4b commit 77a6131
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/aquarea/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ def target_temperature_message_received(message):
_LOGGER.debug(
f"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):
# when reaching that point, maybe we should set a wider range to avoid blocking user?
_LOGGER.warn(f"Target temperature is not within expected range, this is suspicious")
self.async_write_ha_state()

await mqtt.async_subscribe(
Expand Down

0 comments on commit 77a6131

Please sign in to comment.