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

LydosHybrid: add anti cooling temperature #133

Merged
merged 1 commit into from
Feb 5, 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
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
Loading