Skip to content

feat: add support for Ariston Lydos Wifi's boost mode #163

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

Merged
merged 3 commits into from
Feb 14, 2025
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: 3 additions & 1 deletion ariston/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,22 @@
from .nuos_split_device import AristonNuosSplitDevice
from .base_device import AristonBaseDevice
from .velis_base_device import AristonVelisBaseDevice
from .lydos_device import AristonLydosDevice

_LOGGER = logging.getLogger(__name__)

_MAP_WHE_TYPES_TO_CLASS: dict[int, Type[AristonVelisBaseDevice]] = {
WheType.Evo.value: AristonEvoOneDevice,
WheType.LydosHybrid.value: AristonLydosHybridDevice,
WheType.Lydos.value: AristonEvoDevice,
WheType.Lydos.value: AristonLydosDevice,
WheType.NuosSplit.value: AristonNuosSplitDevice,
WheType.Andris2.value: AristonEvoDevice,
WheType.Evo2.value: AristonEvoDevice,
WheType.Lux2.value: AristonLux2Device,
WheType.Lux.value: AristonLuxDevice,
}


class Ariston:
"""Ariston class"""

Expand Down
39 changes: 39 additions & 0 deletions ariston/lydos_device.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"""Evo device class for Ariston module."""

from __future__ import annotations

import logging

from .const import (
EvoDeviceProperties,
LuxPlantMode,
WaterHeaterMode,
)
from .evo_device import AristonEvoDevice

_LOGGER = logging.getLogger(__name__)


class AristonLydosDevice(AristonEvoDevice):
"""Class representing a physical Lydos Wi-Fi device, it's state and properties."""

@property
def water_heater_mode(self) -> type[WaterHeaterMode]:
"""Return the water heater mode class"""
return LuxPlantMode

def set_water_heater_operation_mode(self, operation_mode: str):
"""Set water heater operation mode"""
self.api.set_evo_mode(self.gw, self.water_heater_mode[operation_mode])
self.data[EvoDeviceProperties.MODE] = self.water_heater_mode[
operation_mode
].value

async def async_set_water_heater_operation_mode(self, operation_mode: str):
"""Async set water heater operation mode"""
await self.api.async_set_evo_mode(
self.gw, self.water_heater_mode[operation_mode]
)
self.data[EvoDeviceProperties.MODE] = self.water_heater_mode[
operation_mode
].value
Loading