Skip to content

Commit

Permalink
Lydos hybrid: permanent boost, anti cooling
Browse files Browse the repository at this point in the history
  • Loading branch information
fustom committed Feb 5, 2024
1 parent 66eba91 commit 363641d
Showing 1 changed file with 42 additions and 25 deletions.
67 changes: 42 additions & 25 deletions custom_components/ariston/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
SystemType,
WheType,
DeviceAttribute,
SeDeviceSettings,
ARISTON_BUS_ERRORS,
)

Expand Down Expand Up @@ -448,7 +449,7 @@ class AristonSelectEntityDescription(
WheType.Lux,
WheType.Evo,
WheType.Evo2,
WheType.Lux2,
WheType.Lux2,
WheType.Lydos,
],
),
Expand Down Expand Up @@ -533,9 +534,8 @@ class AristonSelectEntityDescription(
name=f"{NAME} automatic thermoregulation",
icon="mdi:radiator",
device_features=[DeviceFeatures.AUTO_THERMO_REG],
set_value=lambda entity, value: entity.device.async_set_automatic_thermoregulation(
value
),
set_value=lambda entity,
value: entity.device.async_set_automatic_thermoregulation(value),
get_is_on=lambda entity: entity.device.automatic_thermoregulation,
system_types=[SystemType.GALEVO],
),
Expand Down Expand Up @@ -569,9 +569,8 @@ class AristonSelectEntityDescription(
key=EvoDeviceProperties.PWR_OPT,
name=f"{NAME} power option",
icon="mdi:leaf",
set_value=lambda entity, value: entity.device.async_set_water_heater_power_option(
value
),
set_value=lambda entity,
value: entity.device.async_set_water_heater_power_option(value),
get_is_on=lambda entity: entity.device.water_heater_power_option_value,
system_types=[SystemType.VELIS],
whe_types=[WheType.Lux2],
Expand Down Expand Up @@ -624,6 +623,30 @@ class AristonSelectEntityDescription(
system_types=[SystemType.VELIS],
whe_types=[WheType.NuosSplit],
),
AristonSwitchEntityDescription(
key=SeDeviceSettings.SE_PERMANENT_BOOST_ON_OFF,
name=f"{NAME} permanent boost",
icon="mdi:car-turbocharger",
entity_category=EntityCategory.CONFIG,
set_value=lambda entity, value: entity.device.async_set_permanent_boost_value(
value
),
get_is_on=lambda entity: entity.device.permanent_boost_value,
system_types=[SystemType.VELIS],
whe_types=[WheType.LydosHybrid],
),
AristonSwitchEntityDescription(
key=SeDeviceSettings.SE_ANTI_COOLING_ON_OFF,
name=f"{NAME} anti cooling",
icon="mdi:snowflake-thermometer",
entity_category=EntityCategory.CONFIG,
set_value=lambda entity, value: entity.device.async_set_anti_cooling_value(
value
),
get_is_on=lambda entity: entity.device.anti_cooling_value,
system_types=[SystemType.VELIS],
whe_types=[WheType.LydosHybrid],
),
)

ARISTON_NUMBER_TYPES: list[AristonNumberEntityDescription] = (
Expand Down Expand Up @@ -666,9 +689,8 @@ class AristonSelectEntityDescription(
get_native_max_value=lambda entity: entity.device.water_heater_maximum_setpoint_temperature_maximum,
native_step=1,
get_native_value=lambda entity: entity.device.water_heater_maximum_setpoint_temperature,
set_native_value=lambda entity, value: entity.device.async_set_max_setpoint_temp(
value
),
set_native_value=lambda entity,
value: entity.device.async_set_max_setpoint_temp(value),
system_types=[SystemType.VELIS],
whe_types=[
WheType.Andris2,
Expand All @@ -689,9 +711,8 @@ class AristonSelectEntityDescription(
get_native_max_value=lambda entity: entity.device.water_heater_minimum_setpoint_temperature_maximum,
native_step=1,
get_native_value=lambda entity: entity.device.water_heater_minimum_setpoint_temperature,
set_native_value=lambda entity, value: entity.device.async_set_min_setpoint_temp(
value
),
set_native_value=lambda entity,
value: entity.device.async_set_min_setpoint_temp(value),
system_types=[SystemType.VELIS],
whe_types=[WheType.NuosSplit],
),
Expand All @@ -704,9 +725,8 @@ class AristonSelectEntityDescription(
get_native_max_value=lambda entity: entity.device.water_heater_maximum_temperature,
native_step=1,
get_native_value=lambda entity: entity.device.water_heater_reduced_temperature,
set_native_value=lambda entity, value: entity.device.async_set_water_heater_reduced_temperature(
value
),
set_native_value=lambda entity,
value: entity.device.async_set_water_heater_reduced_temperature(value),
system_types=[SystemType.VELIS],
whe_types=[WheType.NuosSplit],
),
Expand All @@ -728,9 +748,8 @@ class AristonSelectEntityDescription(
get_native_value=lambda entity: entity.device.get_heating_flow_temp_value(
entity.zone
),
set_native_value=lambda entity, value: entity.device.async_set_heating_flow_temp(
value, entity.zone
),
set_native_value=lambda entity,
value: entity.device.async_set_heating_flow_temp(value, entity.zone),
system_types=[SystemType.GALEVO],
),
AristonNumberEntityDescription(
Expand All @@ -751,9 +770,8 @@ class AristonSelectEntityDescription(
get_native_value=lambda entity: entity.device.get_heating_flow_offset_value(
entity.zone
),
set_native_value=lambda entity, value: entity.device.async_set_heating_flow_offset(
value, entity.zone
),
set_native_value=lambda entity,
value: entity.device.async_set_heating_flow_offset(value, entity.zone),
system_types=[SystemType.GALEVO],
),
AristonNumberEntityDescription(
Expand Down Expand Up @@ -831,9 +849,8 @@ class AristonSelectEntityDescription(
device_features=[DeviceFeatures.BUFFER_TIME_PROG_AVAILABLE],
get_current_option=lambda entity: entity.device.buffer_control_mode,
get_options=lambda entity: entity.device.buffer_control_mode_opt_texts,
select_option=lambda entity, option: entity.device.async_set_buffer_control_mode(
option
),
select_option=lambda entity,
option: entity.device.async_set_buffer_control_mode(option),
system_types=[SystemType.GALEVO],
),
)

0 comments on commit 363641d

Please sign in to comment.