Skip to content

Commit

Permalink
Merge pull request #339 from sti0/feature/lwz-heating-curve
Browse files Browse the repository at this point in the history
Heating curve entities for LWZ
  • Loading branch information
pail23 authored Dec 22, 2024
2 parents 942ff62 + 0e8e085 commit 54859b4
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 5 deletions.
2 changes: 2 additions & 0 deletions custom_components/stiebel_eltron_isg/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,11 @@

COMFORT_TEMPERATURE_TARGET_HK1 = "comfort_temperature_target_hk1"
ECO_TEMPERATURE_TARGET_HK1 = "eco_temperature_target_hk1"
HEATING_CURVE_LOW_END_HK1 = "heating_curve_low_end_hk1"
HEATING_CURVE_RISE_HK1 = "heating_curve_rise_hk1"
COMFORT_TEMPERATURE_TARGET_HK2 = "comfort_temperature_target_hk2"
ECO_TEMPERATURE_TARGET_HK2 = "eco_temperature_target_hk2"
HEATING_CURVE_LOW_END_HK2 = "heating_curve_low_end_hk2"
HEATING_CURVE_RISE_HK2 = "heating_curve_rise_hk2"
COMFORT_TEMPERATURE_TARGET_HK3 = "comfort_temperature_target_hk3"
ECO_TEMPERATURE_TARGET_HK3 = "eco_temperature_target_hk3"
Expand Down
18 changes: 14 additions & 4 deletions custom_components/stiebel_eltron_isg/lwz_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
FLOW_TEMPERATURE,
HEAT_UP_PROGRAM,
HEATER_PRESSURE,
HEATING_CURVE_LOW_END_HK1,
HEATING_CURVE_LOW_END_HK2,
HEATING_CURVE_RISE_HK1,
HEATING_CURVE_RISE_HK2,
IS_COOLING,
Expand Down Expand Up @@ -290,12 +292,18 @@ async def read_modbus_system_paramter(self) -> dict:
decoder.decode_16bit_int(),
100,
)
decoder.skip_bytes(2)
result[HEATING_CURVE_LOW_END_HK1] = get_isg_scaled_value(
decoder.decode_16bit_int(),
100,
)
result[HEATING_CURVE_RISE_HK2] = get_isg_scaled_value(
decoder.decode_16bit_int(),
100,
)
decoder.skip_bytes(2)
result[HEATING_CURVE_LOW_END_HK2] = get_isg_scaled_value(
decoder.decode_16bit_int(),
100,
)
result[COMFORT_WATER_TEMPERATURE_TARGET] = get_isg_scaled_value(
decoder.decode_16bit_int(),
)
Expand Down Expand Up @@ -420,14 +428,16 @@ async def set_data(self, key, value) -> None:
await self.write_register(address=1002, value=int(value * 10), slave=1)
elif key == HEATING_CURVE_RISE_HK1:
await self.write_register(address=1007, value=int(value * 100), slave=1)

elif key == HEATING_CURVE_LOW_END_HK1:
await self.write_register(address=1008, value=int(value * 100), slave=1)
elif key == COMFORT_TEMPERATURE_TARGET_HK2:
await self.write_register(address=1004, value=int(value * 10), slave=1)
elif key == ECO_TEMPERATURE_TARGET_HK2:
await self.write_register(address=1005, value=int(value * 10), slave=1)
elif key == HEATING_CURVE_RISE_HK2:
await self.write_register(address=1009, value=int(value * 100), slave=1)

elif key == HEATING_CURVE_LOW_END_HK2:
await self.write_register(address=1010, value=int(value * 100), slave=1)
elif key == COMFORT_WATER_TEMPERATURE_TARGET:
await self.write_register(address=1011, value=int(value * 10), slave=1)
elif key == ECO_WATER_TEMPERATURE_TARGET:
Expand Down
41 changes: 40 additions & 1 deletion custom_components/stiebel_eltron_isg/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
FAN_COOLING_TARGET_ROOM_TEMPERATURE,
FAN_LEVEL_DAY,
FAN_LEVEL_NIGHT,
HEATING_CURVE_LOW_END_HK1,
HEATING_CURVE_LOW_END_HK2,
HEATING_CURVE_RISE_HK1,
HEATING_CURVE_RISE_HK2,
HEATING_CURVE_RISE_HK3,
Expand Down Expand Up @@ -299,7 +301,44 @@
native_max_value=30,
native_step=0.1,
),
# Add HEATING_CURVE_RISE with max value 5
NumberEntityDescription(
HEATING_CURVE_RISE_HK1,
has_entity_name=True,
name="Heating Curve Rise HK1",
icon="mdi:chart-bell-curve-cumulative",
native_min_value=0,
native_max_value=5,
native_step=0.01,
),
NumberEntityDescription(
HEATING_CURVE_RISE_HK2,
has_entity_name=True,
name="Heating Curve Rise HK2",
icon="mdi:chart-bell-curve-cumulative",
native_min_value=0,
native_max_value=5,
native_step=0.01,
),
NumberEntityDescription(
HEATING_CURVE_LOW_END_HK1,
has_entity_name=True,
name="Heating Curve Low End HK1",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
icon="mdi:chart-sankey",
native_min_value=0,
native_max_value=20,
native_step=0.5,
),
NumberEntityDescription(
HEATING_CURVE_LOW_END_HK2,
has_entity_name=True,
name="Heating Curve Low End HK2",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
icon="mdi:chart-sankey",
native_min_value=0,
native_max_value=20,
native_step=0.5,
),
]


Expand Down

0 comments on commit 54859b4

Please sign in to comment.