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

Added cooling temperature input numbers for LWZ #268

Merged
merged 2 commits into from
Jul 4, 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
5 changes: 5 additions & 0 deletions custom_components/stiebel_eltron_isg/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@
HEATING_CURVE_RISE_HK2 = "heating_curve_rise_hk2"
DUALMODE_TEMPERATURE_HZG = "dualmode_temperature_hzg"

COMFORT_COOLING_TEMPERATURE_TARGET_HK1 = "comfort_cooling_temperature_target_hk1"
ECO_COOLING_TEMPERATURE_TARGET_HK1 = "eco_cooling_temperature_target_hk1"
COMFORT_COOLING_TEMPERATURE_TARGET_HK2 = "comfort_cooling_temperature_target_hk2"
ECO_COOLING_TEMPERATURE_TARGET_HK2 = "eco_cooling_temperature_target_hk2"

COMFORT_WATER_TEMPERATURE_TARGET = "comfort_water_temperature_target"
ECO_WATER_TEMPERATURE_TARGET = "eco_water_temperature_target"
DUALMODE_TEMPERATURE_WW = "dualmode_temperature_ww"
Expand Down
26 changes: 26 additions & 0 deletions custom_components/stiebel_eltron_isg/lwz_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
ACTUAL_TEMPERATURE_HK1,
ACTUAL_TEMPERATURE_HK2,
ACTUAL_TEMPERATURE_WATER,
COMFORT_COOLING_TEMPERATURE_TARGET_HK1,
COMFORT_COOLING_TEMPERATURE_TARGET_HK2,
COMFORT_TEMPERATURE_TARGET_HK1,
COMFORT_TEMPERATURE_TARGET_HK2,
COMFORT_WATER_TEMPERATURE_TARGET,
Expand All @@ -40,6 +42,8 @@
CONSUMED_WATER_HEATING_TOTAL,
DEWPOINT_TEMPERATURE_HK1,
DEWPOINT_TEMPERATURE_HK2,
ECO_COOLING_TEMPERATURE_TARGET_HK1,
ECO_COOLING_TEMPERATURE_TARGET_HK2,
ECO_TEMPERATURE_TARGET_HK1,
ECO_TEMPERATURE_TARGET_HK2,
ECO_WATER_TEMPERATURE_TARGET,
Expand Down Expand Up @@ -295,6 +299,20 @@ async def read_modbus_system_paramter(self) -> dict:
decoder.skip_bytes(8)
result[FAN_LEVEL_DAY] = decoder.decode_16bit_uint()
result[FAN_LEVEL_NIGHT] = decoder.decode_16bit_uint()
decoder.skip_bytes(4)
result[COMFORT_COOLING_TEMPERATURE_TARGET_HK1] = get_isg_scaled_value(
decoder.decode_16bit_int(),
)
result[ECO_COOLING_TEMPERATURE_TARGET_HK1] = get_isg_scaled_value(
decoder.decode_16bit_int(),
)
result[COMFORT_COOLING_TEMPERATURE_TARGET_HK2] = get_isg_scaled_value(
decoder.decode_16bit_int(),
)
result[ECO_COOLING_TEMPERATURE_TARGET_HK2] = get_isg_scaled_value(
decoder.decode_16bit_int(),
)

result["system_paramaters"] = list(inverter_data.registers)
return result

Expand Down Expand Up @@ -412,6 +430,14 @@ async def set_data(self, key, value) -> None:
await self.write_register(address=1017, value=int(value), slave=1)
elif key == FAN_LEVEL_NIGHT:
await self.write_register(address=1018, value=int(value), slave=1)
elif key == COMFORT_COOLING_TEMPERATURE_TARGET_HK1:
await self.write_register(address=1021, value=int(value * 10), slave=1)
elif key == ECO_COOLING_TEMPERATURE_TARGET_HK1:
await self.write_register(address=1022, value=int(value * 10), slave=1)
elif key == COMFORT_COOLING_TEMPERATURE_TARGET_HK2:
await self.write_register(address=1023, value=int(value * 10), slave=1)
elif key == ECO_COOLING_TEMPERATURE_TARGET_HK2:
await self.write_register(address=1024, value=int(value * 10), slave=1)
else:
return
self.data[key] = value
Expand Down
44 changes: 44 additions & 0 deletions custom_components/stiebel_eltron_isg/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
from .const import (
AREA_COOLING_TARGET_FLOW_TEMPERATURE,
AREA_COOLING_TARGET_ROOM_TEMPERATURE,
COMFORT_COOLING_TEMPERATURE_TARGET_HK1,
COMFORT_COOLING_TEMPERATURE_TARGET_HK2,
COMFORT_TEMPERATURE_TARGET_HK1,
COMFORT_TEMPERATURE_TARGET_HK2,
COMFORT_WATER_TEMPERATURE_TARGET,
DOMAIN,
DUALMODE_TEMPERATURE_HZG,
DUALMODE_TEMPERATURE_WW,
ECO_COOLING_TEMPERATURE_TARGET_HK1,
ECO_COOLING_TEMPERATURE_TARGET_HK2,
ECO_TEMPERATURE_TARGET_HK1,
ECO_TEMPERATURE_TARGET_HK2,
ECO_WATER_TEMPERATURE_TARGET,
Expand Down Expand Up @@ -201,6 +205,46 @@
native_max_value=3,
native_step=1,
),
NumberEntityDescription(
COMFORT_COOLING_TEMPERATURE_TARGET_HK1,
has_entity_name=True,
name="Comfort Cooling Temperature Target HK1",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
icon="mdi:snowflake-thermometer",
native_min_value=10,
native_max_value=30,
native_step=0.1,
),
NumberEntityDescription(
ECO_COOLING_TEMPERATURE_TARGET_HK1,
has_entity_name=True,
name="Eco Cooling Temperature Target HK1",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
icon="mdi:snowflake-thermometer",
native_min_value=10,
native_max_value=30,
native_step=0.1,
),
NumberEntityDescription(
COMFORT_COOLING_TEMPERATURE_TARGET_HK2,
has_entity_name=True,
name="Comfort Cooling Temperature Target HK2",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
icon="mdi:snowflake-thermometer",
native_min_value=10,
native_max_value=30,
native_step=0.1,
),
NumberEntityDescription(
ECO_COOLING_TEMPERATURE_TARGET_HK2,
has_entity_name=True,
name="Eco Cooling Temperature Target HK2",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
icon="mdi:snowflake-thermometer",
native_min_value=10,
native_max_value=30,
native_step=0.1,
),
# Add HEATING_CURVE_RISE with max value 5
]

Expand Down