Skip to content

Commit ea11857

Browse files
ivan-gjfustom
andauthored
feat: add support for Ariston Lydos Wifi's boost mode (#163)
* feat: add support for Ariston Lydos Wifi's boost mode This should address [this issue](fustom/ariston-remotethermo-home-assistant-v3#364) from the Home Assistant integration. I've locally tested this and it works on my device. * Organize AristonLydosDevice import --------- Co-authored-by: fustom <[email protected]>
1 parent b7af9b3 commit ea11857

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

ariston/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,22 @@
2323
from .nuos_split_device import AristonNuosSplitDevice
2424
from .base_device import AristonBaseDevice
2525
from .velis_base_device import AristonVelisBaseDevice
26+
from .lydos_device import AristonLydosDevice
2627

2728
_LOGGER = logging.getLogger(__name__)
2829

2930
_MAP_WHE_TYPES_TO_CLASS: dict[int, Type[AristonVelisBaseDevice]] = {
3031
WheType.Evo.value: AristonEvoOneDevice,
3132
WheType.LydosHybrid.value: AristonLydosHybridDevice,
32-
WheType.Lydos.value: AristonEvoDevice,
33+
WheType.Lydos.value: AristonLydosDevice,
3334
WheType.NuosSplit.value: AristonNuosSplitDevice,
3435
WheType.Andris2.value: AristonEvoDevice,
3536
WheType.Evo2.value: AristonEvoDevice,
3637
WheType.Lux2.value: AristonLux2Device,
3738
WheType.Lux.value: AristonLuxDevice,
3839
}
3940

41+
4042
class Ariston:
4143
"""Ariston class"""
4244

ariston/lydos_device.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
"""Evo device class for Ariston module."""
2+
3+
from __future__ import annotations
4+
5+
import logging
6+
7+
from .const import (
8+
EvoDeviceProperties,
9+
LuxPlantMode,
10+
WaterHeaterMode,
11+
)
12+
from .evo_device import AristonEvoDevice
13+
14+
_LOGGER = logging.getLogger(__name__)
15+
16+
17+
class AristonLydosDevice(AristonEvoDevice):
18+
"""Class representing a physical Lydos Wi-Fi device, it's state and properties."""
19+
20+
@property
21+
def water_heater_mode(self) -> type[WaterHeaterMode]:
22+
"""Return the water heater mode class"""
23+
return LuxPlantMode
24+
25+
def set_water_heater_operation_mode(self, operation_mode: str):
26+
"""Set water heater operation mode"""
27+
self.api.set_evo_mode(self.gw, self.water_heater_mode[operation_mode])
28+
self.data[EvoDeviceProperties.MODE] = self.water_heater_mode[
29+
operation_mode
30+
].value
31+
32+
async def async_set_water_heater_operation_mode(self, operation_mode: str):
33+
"""Async set water heater operation mode"""
34+
await self.api.async_set_evo_mode(
35+
self.gw, self.water_heater_mode[operation_mode]
36+
)
37+
self.data[EvoDeviceProperties.MODE] = self.water_heater_mode[
38+
operation_mode
39+
].value

0 commit comments

Comments
 (0)