Skip to content

Commit

Permalink
Lydos hybrid: permanent boost, anti cooling (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
fustom authored Feb 5, 2024
1 parent 57d0f82 commit 402f67b
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions ariston/lydos_hybrid_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ def electric_consumption_for_water_last_two_hours(self) -> int:
ConsumptionTimeInterval.LAST_DAY,
)

@property
def permanent_boost_value(self) -> int:
"""Get permanent boost value"""
return self.plant_settings.get(SeDeviceSettings.SE_PERMANENT_BOOST_ON_OFF, 0)

@property
def anti_cooling_value(self) -> int:
"""Get anti cooling value"""
return self.plant_settings.get(SeDeviceSettings.SE_ANTI_COOLING_ON_OFF, 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 All @@ -85,3 +95,47 @@ async def async_set_water_heater_temperature(self, temperature: float):
"""Async set water heater temperature"""
await self.api.async_set_lydos_temperature(self.gw, temperature)
self.data[LydosDeviceProperties.REQ_TEMP] = temperature

def set_permanent_boost_value(self, boost: float) -> None:
"""Set permanent boost value"""
self.api.set_velis_plant_setting(
self.plant_data,
self.gw,
SeDeviceSettings.SE_PERMANENT_BOOST_ON_OFF,
boost,
self.permanent_boost_value,
)
self.plant_settings[SeDeviceSettings.SE_PERMANENT_BOOST_ON_OFF] = boost

async def async_set_permanent_boost_value(self, boost: float) -> None:
"""Async set permanent boost value"""
await self.api.async_set_velis_plant_setting(
self.plant_data,
self.gw,
SeDeviceSettings.SE_PERMANENT_BOOST_ON_OFF,
boost,
self.permanent_boost_value,
)
self.plant_settings[SeDeviceSettings.SE_PERMANENT_BOOST_ON_OFF] = boost

def set_anti_cooling_value(self, anti_cooling: float) -> None:
"""Set anti cooling value"""
self.api.set_velis_plant_setting(
self.plant_data,
self.gw,
SeDeviceSettings.SE_ANTI_COOLING_ON_OFF,
anti_cooling,
self.anti_cooling_value,
)
self.plant_settings[SeDeviceSettings.SE_ANTI_COOLING_ON_OFF] = anti_cooling

async def async_set_anti_cooling_value(self, anti_cooling: float) -> None:
"""Async set anti cooling value"""
await self.api.async_set_velis_plant_setting(
self.plant_data,
self.gw,
SeDeviceSettings.SE_ANTI_COOLING_ON_OFF,
anti_cooling,
self.anti_cooling_value,
)
self.plant_settings[SeDeviceSettings.SE_ANTI_COOLING_ON_OFF] = anti_cooling

0 comments on commit 402f67b

Please sign in to comment.