Skip to content

Commit

Permalink
πŸ› Disable temperature set for pumps in thermostat mode
Browse files Browse the repository at this point in the history
Relates to #250
  • Loading branch information
kamaradclimber committed Sep 14, 2024
1 parent 73be04f commit 42d4e49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions custom_components/aquarea/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ async def async_set_temperature(self, **kwargs) -> None:
_LOGGER.info(
f"{self._climate_type()} Changing {self.name} target room temperature to {temperature} for zone {self.zone_id}"
)
elif self._mode == ZoneTemperatureMode.NAN:
_LOGGER.warn(f"{self._climate_type()} Changing {self.name} target temperature is not allowed for zone {self.zone_id} (external thermostat)")
return
else:
raise Exception(f"Unknown climate mode: {self._mode}")
payload = str(temperature)
Expand Down Expand Up @@ -289,6 +292,8 @@ async def async_added_to_hass(self) -> None:
self._climate_mode = ZoneClimateMode(stored_values["zone_climate_mode"])
self._mode = ZoneTemperatureMode(stored_values["zone_temperature_mode"])
self.change_mode(self._mode)
if self._mode == ZoneTemperatureMode.NAN:
self._attr_supported_features = ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
else:
self.change_mode(ZoneTemperatureMode.DIRECT, initialization=True)

Expand Down

0 comments on commit 42d4e49

Please sign in to comment.