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

add current power comsumption sensor #277

Merged
merged 1 commit into from
Oct 5, 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
2 changes: 2 additions & 0 deletions custom_components/luxtronik/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ class LuxCalculation(StrEnum):
# 254 Flow Rate
C0257_CURRENT_HEAT_OUTPUT: Final = "calculations.Heat_Output"
# 258 RBE Version
C0268_CURRENT_POWER_CONSUMPTION: Final = "calculations.Unknown_Calculation_268"


# endregion Lux calculations
Expand Down Expand Up @@ -606,6 +607,7 @@ class SensorKey(StrEnum):
ANALOG_OUT1 = "analog_out1"
ANALOG_OUT2 = "analog_out2"
CURRENT_HEAT_OUTPUT = "current_heat_output"
CURRENT_POWER_CONSUMPTION = "current_power_consumption"
PUMP_FREQUENCY = "pump_frequency"
PUMP_FLOW_DELTA_TARGET = "pump_flow_delta_target"
PUMP_FLOW_DELTA = "pump_flow_delta"
Expand Down
11 changes: 11 additions & 0 deletions custom_components/luxtronik/sensor_entities_predefined.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,17 @@
attr(SA.REMEDY, LC.C0100_ERROR_REASON),
),
),
descr(
key=SensorKey.CURRENT_POWER_CONSUMPTION,
luxtronik_key=LC.C0268_CURRENT_POWER_CONSUMPTION,
icon="mdi:lightning-bolt-circle",
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
entity_category=EntityCategory.DIAGNOSTIC,
native_unit_of_measurement=UnitOfPower.WATT,
entity_registry_enabled_default=False,
native_precision=0,
),
# endregion Main heatpump
# region Heating
descr(
Expand Down
3 changes: 3 additions & 0 deletions custom_components/luxtronik/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,9 @@
"current_heat_output": {
"name": "Leistung Ist"
},
"current_power_consumption": {
"name": "Leistungsaufnahme"
},
"additional_heat_generator_amount_counter": {
"name": "Zus\u00e4tzlicher W\u00e4rmeerzeuger W\u00e4rmemenge"
},
Expand Down
21 changes: 12 additions & 9 deletions custom_components/luxtronik/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@
"cooling_stop_delay_hours": {
"name": "Stop delay"
},
"cooling_target_temperature_mk1": {
"cooling_target_temperature_mk1": {
"name": "Cooling target temperature"
},
"cooling_target_temperature_mk2": {
"cooling_target_temperature_mk2": {
"name": "Cooling target temperature"
},
"cooling_target_temperature_mk3": {
"cooling_target_temperature_mk3": {
"name": "Cooling target temperature"
},
"heat_source_input_temperature_min": {
Expand Down Expand Up @@ -314,7 +314,7 @@
"remedy": {
"name": "Remedy"
}
},
},
"switchoff_reason": {
"name": "Switchoff reason",
"state": {
Expand Down Expand Up @@ -445,6 +445,9 @@
"current_heat_output": {
"name": "Current heat output"
},
"current_power_consumption": {
"name": "Current power consumption"
},
"additional_heat_generator_amount_counter": {
"name": "Additional heat generator amount counter"
},
Expand Down Expand Up @@ -559,8 +562,8 @@
"user": {
"description": "Set up your Luxtronik heatpump controller to allow monitoring and control.",
"data": {
"host": "Host",
"port": "Network Port",
"host": "Host",
"port": "Network Port",
"timeout": "Network socket timeout (Sec.)",
"max_data_length": "Max data package length"
},
Expand All @@ -570,8 +573,8 @@
"timeout": "If the network or the heatpump is slow, you can fine tune the timeout.",
"max_data_length": "If the network or the heatpump is slow, you can fine tune the date package length."
}
},
"options": {
},
"options": {
"description": "Settings for the Luxtronik heatpump {name}.\nThese settings can also be changed later under Integrations.",
"data": {
"ha_sensor_indoor_temperature": "Sensor id for the indoor temperature",
Expand All @@ -583,7 +586,7 @@
"control_mode_home_assistant": "When the Home Assistant Thermostat is in the Idle state, the Off state is reported to Luxtronik and Luxtronik cannot start this item.",
"ha_sensor_prefix": "Important if several heat pumps are used.\nIn the case of a single one, 'luxtronik' can simply be used."
}
}
}
}
},
"options": {
Expand Down
Loading