From 89cb0b53d3460518bb21048d97a99c33ca60570d Mon Sep 17 00:00:00 2001 From: sti0 Date: Sun, 22 Dec 2024 00:17:50 +0000 Subject: [PATCH] Add extract air temperature and dew point for LWZ devices --- custom_components/stiebel_eltron_isg/const.py | 2 ++ .../stiebel_eltron_isg/lwz_coordinator.py | 12 +++++++++--- custom_components/stiebel_eltron_isg/sensor.py | 8 ++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/custom_components/stiebel_eltron_isg/const.py b/custom_components/stiebel_eltron_isg/const.py index 7324c40..561eb1f 100644 --- a/custom_components/stiebel_eltron_isg/const.py +++ b/custom_components/stiebel_eltron_isg/const.py @@ -218,6 +218,8 @@ VENTILATION_AIR_TARGET_FLOW_RATE = "ventilation_air_target_flow_rate" EXTRACT_AIR_ACTUAL_FAN_SPEED = "extract_air_actual" EXTRACT_AIR_TARGET_FLOW_RATE = "extract_air_target_flowrate" +EXTRACT_AIR_DEW_POINT = "extract_air_dew_point" +EXTRACT_AIR_TEMPERATURE = "extract_air_temperature" EXTRACT_AIR_HUMIDITY = "extract_air_humidity" RESET_HEATPUMP = "reset_heatpump" diff --git a/custom_components/stiebel_eltron_isg/lwz_coordinator.py b/custom_components/stiebel_eltron_isg/lwz_coordinator.py index 504208d..f231e39 100644 --- a/custom_components/stiebel_eltron_isg/lwz_coordinator.py +++ b/custom_components/stiebel_eltron_isg/lwz_coordinator.py @@ -53,8 +53,10 @@ ERROR_STATUS, EVAPORATOR_DEFROST, EXTRACT_AIR_ACTUAL_FAN_SPEED, + EXTRACT_AIR_DEW_POINT, EXTRACT_AIR_HUMIDITY, EXTRACT_AIR_TARGET_FLOW_RATE, + EXTRACT_AIR_TEMPERATURE, FAN_LEVEL_DAY, FAN_LEVEL_NIGHT, FILTER, @@ -222,14 +224,18 @@ async def read_modbus_system_values(self) -> dict: result[TARGET_TEMPERATURE_WATER] = get_isg_scaled_value( decoder.decode_16bit_int(), ) - # 18-19-20-21-22 + # 18-19-20-21-22-23-24 result[VENTILATION_AIR_ACTUAL_FAN_SPEED] = decoder.decode_16bit_uint() result[VENTILATION_AIR_TARGET_FLOW_RATE] = decoder.decode_16bit_uint() result[EXTRACT_AIR_ACTUAL_FAN_SPEED] = decoder.decode_16bit_uint() result[EXTRACT_AIR_TARGET_FLOW_RATE] = decoder.decode_16bit_uint() result[EXTRACT_AIR_HUMIDITY] = decoder.decode_16bit_uint() - # skip 23-24 - decoder.skip_bytes(4) + result[EXTRACT_AIR_TEMPERATURE] = get_isg_scaled_value( + decoder.decode_16bit_uint() + ) + result[EXTRACT_AIR_DEW_POINT] = get_isg_scaled_value( + decoder.decode_16bit_uint() + ) # 25-26 result[DEWPOINT_TEMPERATURE_HK1] = get_isg_scaled_value( decoder.decode_16bit_int() diff --git a/custom_components/stiebel_eltron_isg/sensor.py b/custom_components/stiebel_eltron_isg/sensor.py index 487b271..a95b218 100644 --- a/custom_components/stiebel_eltron_isg/sensor.py +++ b/custom_components/stiebel_eltron_isg/sensor.py @@ -61,8 +61,10 @@ ELECTRICAL_BOOSTER_HEATING, ELECTRICAL_BOOSTER_HEATING_WATER, EXTRACT_AIR_ACTUAL_FAN_SPEED, + EXTRACT_AIR_DEW_POINT, EXTRACT_AIR_HUMIDITY, EXTRACT_AIR_TARGET_FLOW_RATE, + EXTRACT_AIR_TEMPERATURE, FLOW_TEMPERATURE, FLOW_TEMPERATURE_NHZ, FLOW_TEMPERATURE_WP1, @@ -483,7 +485,13 @@ def create_volume_stream_entity_description(name, key): native_unit_of_measurement=UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR, state_class=SensorStateClass.MEASUREMENT, ), + create_temperature_entity_description( + "Extract air dew point", EXTRACT_AIR_DEW_POINT + ), create_humidity_entity_description("Extract air humidity", EXTRACT_AIR_HUMIDITY), + create_temperature_entity_description( + "Extract air temperature", EXTRACT_AIR_TEMPERATURE + ), ]