Skip to content

Commit

Permalink
Fixed cooling targets
Browse files Browse the repository at this point in the history
  • Loading branch information
pail23 committed Aug 17, 2023
1 parent 38b12a9 commit 03e5706
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 9 deletions.
28 changes: 24 additions & 4 deletions custom_components/stiebel_eltron_isg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@
HEATING_CURVE_RISE_HK2,
COMFORT_WATER_TEMPERATURE_TARGET,
ECO_WATER_TEMPERATURE_TARGET,
COOLING_TARGET_ROOM_TEMPERATURE,
AREA_COOLING_TARGET_ROOM_TEMPERATURE,
AREA_COOLING_TARGET_FLOW_TEMPERATURE,
FAN_COOLING_TARGET_ROOM_TEMPERATURE,
FAN_COOLING_TARGET_FLOW_TEMPERATURE,
FAN_LEVEL_DAY,
FAN_LEVEL_NIGHT,
VENTILATION_AIR_ACTUAL_FAN_SPEED,
Expand Down Expand Up @@ -469,8 +472,19 @@ def read_modbus_system_paramter(self) -> dict:
result[ECO_WATER_TEMPERATURE_TARGET] = get_isg_scaled_value(
decoder.decode_16bit_int()
)
decoder.skip_bytes(8)
result[COOLING_TARGET_ROOM_TEMPERATURE] = get_isg_scaled_value(
decoder.skip_bytes(4)
result[AREA_COOLING_TARGET_FLOW_TEMPERATURE] = get_isg_scaled_value(
decoder.decode_16bit_int()
)
decoder.skip_bytes(2)
result[AREA_COOLING_TARGET_ROOM_TEMPERATURE] = get_isg_scaled_value(
decoder.decode_16bit_int()
)
result[FAN_COOLING_TARGET_FLOW_TEMPERATURE] = get_isg_scaled_value(
decoder.decode_16bit_int()
)
decoder.skip_bytes(2)
result[FAN_COOLING_TARGET_ROOM_TEMPERATURE] = get_isg_scaled_value(
decoder.decode_16bit_int()
)
return result
Expand Down Expand Up @@ -541,8 +555,14 @@ def set_data(self, key, value) -> None:
self.write_register(address=1509, value=int(value * 10), slave=1)
elif key == ECO_WATER_TEMPERATURE_TARGET:
self.write_register(address=1510, value=int(value * 10), slave=1)
elif key == COOLING_TARGET_ROOM_TEMPERATURE:
elif key == AREA_COOLING_TARGET_FLOW_TEMPERATURE:
self.write_register(address=1513, value=int(value * 10), slave=1)
elif key == AREA_COOLING_TARGET_ROOM_TEMPERATURE:
self.write_register(address=1515, value=int(value * 10), slave=1)
elif key == FAN_COOLING_TARGET_FLOW_TEMPERATURE:
self.write_register(address=1516, value=int(value * 10), slave=1)
elif key == FAN_COOLING_TARGET_ROOM_TEMPERATURE:
self.write_register(address=1518, value=int(value * 10), slave=1)
elif key == CIRCULATION_PUMP:
self.write_register(address=47012, value=value, slave = 1)
else:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/stiebel_eltron_isg/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
has_entity_name=True,
),
BinarySensorEntityDescription(
name="Filter Etract Air",
name="Filter Extract Air",
key=FILTER_EXTRACT_AIR,
icon="mdi:heat-pump",
has_entity_name=True,
Expand Down
5 changes: 4 additions & 1 deletion custom_components/stiebel_eltron_isg/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@

COMFORT_WATER_TEMPERATURE_TARGET = "comfort_water_temperature_target"
ECO_WATER_TEMPERATURE_TARGET = "eco_water_temperature_target"
COOLING_TARGET_ROOM_TEMPERATURE = "cooling_target_room_temperaturee"
AREA_COOLING_TARGET_ROOM_TEMPERATURE = "area_cooling_target_room_temperature"
AREA_COOLING_TARGET_FLOW_TEMPERATURE = "area_cooling_target_flow_temperature"
FAN_COOLING_TARGET_ROOM_TEMPERATURE = "fan_cooling_target_room_temperature"
FAN_COOLING_TARGET_FLOW_TEMPERATURE = "fan_cooling_target_flow_temperature"

FAN_LEVEL_DAY = "fan_level_comfort"
FAN_LEVEL_NIGHT = "fan_level_eco"
Expand Down
39 changes: 36 additions & 3 deletions custom_components/stiebel_eltron_isg/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
HEATING_CURVE_RISE_HK2,
COMFORT_WATER_TEMPERATURE_TARGET,
ECO_WATER_TEMPERATURE_TARGET,
COOLING_TARGET_ROOM_TEMPERATURE,
AREA_COOLING_TARGET_ROOM_TEMPERATURE,
AREA_COOLING_TARGET_FLOW_TEMPERATURE,
FAN_COOLING_TARGET_ROOM_TEMPERATURE,
FAN_COOLING_TARGET_FLOW_TEMPERATURE,
FAN_LEVEL_DAY,
FAN_LEVEL_NIGHT
)
Expand Down Expand Up @@ -90,15 +93,45 @@
native_step=0.1,
),
NumberEntityDescription(
COOLING_TARGET_ROOM_TEMPERATURE,
AREA_COOLING_TARGET_ROOM_TEMPERATURE,
has_entity_name=True,
name="Cooling Room Temperature Target",
name="Area Cooling Room Temperature Target",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
icon="hass:thermometer",
native_min_value=20,
native_max_value=30,
native_step=0.1,
),
NumberEntityDescription(
AREA_COOLING_TARGET_FLOW_TEMPERATURE,
has_entity_name=True,
name="Area Cooling Flow Temperature Target",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
icon="hass:thermometer",
native_min_value=7,
native_max_value=25,
native_step=0.1,
),
NumberEntityDescription(
FAN_COOLING_TARGET_ROOM_TEMPERATURE,
has_entity_name=True,
name="Fan Cooling Room Temperature Target",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
icon="hass:thermometer",
native_min_value=20,
native_max_value=30,
native_step=0.1,
),
NumberEntityDescription(
FAN_COOLING_TARGET_FLOW_TEMPERATURE,
has_entity_name=True,
name="Fan Cooling Flow Temperature Target",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
icon="hass:thermometer",
native_min_value=7,
native_max_value=25,
native_step=0.1,
),
]

NUMBER_TYPES_WPM = [
Expand Down

0 comments on commit 03e5706

Please sign in to comment.