Skip to content

Commit

Permalink
LydosHybrid: add anti cooling temperature (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
fustom committed Feb 5, 2024
1 parent c27ef5d commit 0d607ae
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ariston/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,8 @@ class SeDeviceSettings:
SE_MAX_SETPOINT_TEMPERATURE_MAX: Final[str] = "SeMaxSetpointTemperatureMax"
SE_MAX_SETPOINT_TEMPERATURE_MIN: Final[str] = "SeMaxSetpointTemperatureMin"
SE_ANTI_COOLING_TEMPERATURE: Final[str] = "SeAntiCoolingTemperature"
SE_ANTI_COOLING_TEMPERATURE_MAX: Final[str] = "SeAntiCoolingTemperatureMin"
SE_ANTI_COOLING_TEMPERATURE_MIN: Final[str] = "SeAntiCoolingTemperatureMax"
SE_ANTI_COOLING_TEMPERATURE_MAX: Final[str] = "SeAntiCoolingTemperatureMax"
SE_ANTI_COOLING_TEMPERATURE_MIN: Final[str] = "SeAntiCoolingTemperatureMin"
SE_MAX_GREEN_SETPOINT_TEMPERATURE: Final[str] = "SeMaxGreenSetpointTemperature"
SE_HEATING_RATE: Final[str] = "SeHeatingRate"
SE_NIGHT_BEGIN_AS_MINUTES: Final[str] = "SeNightBeginAsMinutes"
Expand Down
37 changes: 37 additions & 0 deletions ariston/lydos_hybrid_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,21 @@ def anti_cooling_value(self) -> int:
"""Get anti cooling value"""
return self.plant_settings.get(SeDeviceSettings.SE_ANTI_COOLING_ON_OFF, 0)

@property
def anti_cooling_temperature_value(self) -> int:
"""Get anti cooling temperature value"""
return self.plant_settings.get(SeDeviceSettings.SE_ANTI_COOLING_TEMPERATURE, 0)

@property
def anti_cooling_temperature_maximum(self) -> int:
"""Get anti cooling temperature maximum"""
return self.plant_settings.get(SeDeviceSettings.SE_ANTI_COOLING_TEMPERATURE_MAX, 0)

@property
def anti_cooling_temperature_minimum(self) -> int:
"""Get anti cooling temperature minimum"""
return self.plant_settings.get(SeDeviceSettings.SE_ANTI_COOLING_TEMPERATURE_MIN, 0)

def set_water_heater_operation_mode(self, operation_mode: str):
"""Set water heater operation mode"""
self.api.set_lydos_mode(self.gw, LydosPlantMode[operation_mode])
Expand Down Expand Up @@ -139,3 +154,25 @@ async def async_set_anti_cooling_value(self, anti_cooling: float) -> None:
1.0 if self.anti_cooling_value else 0.0,
)
self.plant_settings[SeDeviceSettings.SE_ANTI_COOLING_ON_OFF] = anti_cooling

def set_cooling_temperature_value(self, temperature: float) -> None:
"""Set cooling temperature value"""
self.api.set_velis_plant_setting(
self.plant_data,
self.gw,
SeDeviceSettings.SE_ANTI_COOLING_TEMPERATURE,
temperature,
self.anti_cooling_temperature_value,
)
self.plant_settings[SeDeviceSettings.SE_ANTI_COOLING_TEMPERATURE] = temperature

async def async_set_cooling_temperature_value(self, temperature: float) -> None:
"""Async set cooling temperature value"""
await self.api.async_set_velis_plant_setting(
self.plant_data,
self.gw,
SeDeviceSettings.SE_ANTI_COOLING_TEMPERATURE,
temperature,
self.anti_cooling_temperature_value,
)
self.plant_settings[SeDeviceSettings.SE_ANTI_COOLING_TEMPERATURE] = temperature

0 comments on commit 0d607ae

Please sign in to comment.