Skip to content

Commit

Permalink
Merge pull request #272 from fmoulin/main
Browse files Browse the repository at this point in the history
Add cooling energy input and second heat generator amount counter
  • Loading branch information
BenPru authored Oct 5, 2024
2 parents 745256b + 4f8396f commit 67389da
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/luxtronik/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ class LuxParameter(StrEnum):
P1136_HEAT_ENERGY_INPUT: Final = "parameters.Unknown_Parameter_1136"
P1137_DHW_ENERGY_INPUT: Final = "parameters.Unknown_Parameter_1137"
# ? P1138_SWIMMING_POOL_ENERGY_INPUT: Final = "parameters.Unknown_Parameter_1138" -->
# ? P1139_COOLING_ENERGY_INPUT: Final = "parameters.Unknown_Parameter_1139"
# ? P1140_SECOND_HEAT_SOURCE_DHW_ENERGY_INPUT: Final = "parameters.Unknown_Parameter_1140"
P1139_COOLING_ENERGY_INPUT: Final = "parameters.Unknown_Parameter_1139"
P1140_SECOND_HEAT_GENERATOR_AMOUNT_COUNTER: Final = "parameters.Unknown_Parameter_1140"


# endregion Lux parameters
Expand Down Expand Up @@ -604,6 +604,7 @@ class SensorKey(StrEnum):
ADDITIONAL_HEAT_GENERATOR_AMOUNT_COUNTER = (
"additional_heat_generator_amount_counter"
)
SECOND_HEAT_GENERATOR_AMOUNT_COUNTER= "second_heat_generator_amount_counter"
ANALOG_OUT1 = "analog_out1"
ANALOG_OUT2 = "analog_out2"
CURRENT_HEAT_OUTPUT = "current_heat_output"
Expand All @@ -627,6 +628,7 @@ class SensorKey(StrEnum):
DHW_HEAT_AMOUNT = "dhw_heat_amount"
HEAT_ENERGY_INPUT = "heat_energy_input"
DHW_ENERGY_INPUT = "dhw_energy_input"
COOLING_ENERGY_INPUT = "cooling_energy_input"
DHW_TEMPERATURE = "dhw_temperature"
SOLAR_COLLECTOR_TEMPERATURE = "solar_collector_temperature"
SOLAR_BUFFER_TEMPERATURE = "solar_buffer_temperature"
Expand Down
28 changes: 28 additions & 0 deletions custom_components/luxtronik/sensor_entities_predefined.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,20 @@
native_precision=1,
update_interval=UPDATE_INTERVAL_VERY_SLOW,
),
descr(
key=SensorKey.SECOND_HEAT_GENERATOR_AMOUNT_COUNTER,
luxtronik_key=LP.P1140_SECOND_HEAT_GENERATOR_AMOUNT_COUNTER,
icon="mdi:lightning-bolt-circle",
state_class=SensorStateClass.TOTAL_INCREASING,
device_class=SensorDeviceClass.ENERGY,
entity_category=EntityCategory.DIAGNOSTIC,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
invisible_if_value=0.0,
factor=0.1,
native_precision=1,
min_firmware_version_minor=FirmwareVersionMinor.minor_88,
update_interval=UPDATE_INTERVAL_VERY_SLOW,
),
descr(
key=SensorKey.ANALOG_OUT1,
luxtronik_key=LC.C0156_ANALOG_OUT1,
Expand Down Expand Up @@ -665,5 +679,19 @@
native_precision=2,
update_interval=UPDATE_INTERVAL_VERY_SLOW,
),
descr(
key=SensorKey.COOLING_ENERGY_INPUT,
luxtronik_key=LP.P1139_COOLING_ENERGY_INPUT,
device_key=DeviceKey.cooling,
icon="mdi:circle-slice-3",
state_class=SensorStateClass.TOTAL_INCREASING,
device_class=SensorDeviceClass.ENERGY,
entity_category=EntityCategory.DIAGNOSTIC,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
native_precision=2,
factor=0.01,
min_firmware_version_minor=FirmwareVersionMinor.minor_88,
update_interval=UPDATE_INTERVAL_VERY_SLOW,
),
# endregion Cooling
]
6 changes: 6 additions & 0 deletions custom_components/luxtronik/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@
"additional_heat_generator_amount_counter": {
"name": "Additional heat generator amount counter"
},
"second_heat_generator_amount_counter": {
"name": "Second heat generator amount counter"
},
"heat_source_output_temperature": {
"name": "Heat source output"
},
Expand Down Expand Up @@ -511,6 +514,9 @@
"operation_hours_cooling": {
"name": "Operation hours"
},
"cooling_energy_input": {
"name": "Energy input"
},
"room_thermostat_temperature": {
"name": "Room thermostat"
},
Expand Down

0 comments on commit 67389da

Please sign in to comment.