Skip to content

Commit

Permalink
implemented power limitation, visibilities.Unknown_Parameter_357 is r…
Browse files Browse the repository at this point in the history
…elated to power limitation, not silent mode, added undefined_24 & 25 in switch off reasons
  • Loading branch information
Codectory committed Dec 17, 2024
1 parent 409ce7e commit 10d4b69
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 19 deletions.
22 changes: 8 additions & 14 deletions custom_components/luxtronik/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class FirmwareVersionMinor(Enum):

minor_80: Final = 80
minor_88: Final = 88
minor_90: Final = 90


LUXTRONIK_HA_SIGNAL_UPDATE_ENTITY = "luxtronik_entry_update"
Expand Down Expand Up @@ -226,18 +227,8 @@ class LuxSwitchoffReason(Enum):
undefined_17: Final = 17 # ???
undefined_18: Final = 18 # ???
PV_max: Final = 19
undefined_20: Final = 20 # ???
undefined_21: Final = 21 # ???
undefined_22: Final = 22 # ???
undefined_23: Final = 23 # ???
undefined_24: Final = 24 # ???
undefined_25: Final = 25 # ???
undefined_26: Final = 26 # ???
undefined_27: Final = 27 # ???
undefined_28: Final = 28 # ???
undefined_29: Final = 29 # ???
undefined_30: Final = 30 # ???
undefined_31: Final = 31 # ???
undefined_24: Final = 24 # ???
undefined_25: Final = 25 # ???


LUX_STATE_ICON_MAP: Final[dict[StateType | date | datetime | Decimal, str]] = {
Expand Down Expand Up @@ -393,7 +384,8 @@ class LuxParameter(StrEnum):
# ? P1138_SWIMMING_POOL_ENERGY_INPUT: Final = "parameters.Unknown_Parameter_1138" -->
P1139_COOLING_ENERGY_INPUT: Final = "parameters.Unknown_Parameter_1139"
P1140_SECOND_HEAT_GENERATOR_AMOUNT_COUNTER: Final = "parameters.Unknown_Parameter_1140"

P1158_POWER_LIMIT_SWITCH: Final = "parameters.Unknown_Parameter_1158"
P1159_POWER_LIMIT_VALUE: Final = "parameters.Unknown_Parameter_1159"

# endregion Lux parameters

Expand Down Expand Up @@ -577,7 +569,7 @@ class LuxVisibility(StrEnum):
V0324_ADDITIONAL_HEAT_GENERATOR_AMOUNT_COUNTER: Final = (
"visibilities.ID_Visi_Waermemenge_ZWE"
)
V0357_SILENT_MODE_TIME_MENU: Final = "visibilities.Unknown_Parameter_357"
V0357_ELECTRICAL_POWER_LIMITATION_SWITCH: Final = "visibilities.Unknown_Parameter_357"


# endregion visibilities
Expand Down Expand Up @@ -650,6 +642,8 @@ class SensorKey(StrEnum):
EFFICIENCY_PUMP = "efficiency_pump"
EFFICIENCY_PUMP_NOMINAL = "efficiency_pump_nominal"
EFFICIENCY_PUMP_MINIMAL = "efficiency_pump_minimal"
ELECTRICAL_POWER_LIMITATION_SWITCH = "electrical_power_limitation_switch"
ELECTRICAL_POWER_LIMITATION_VALUE = "electrical_power_limitation_value"
PUMP_HEAT_CONTROL = "pump_heat_control"
HEATING = "heating"
PUMP_OPTIMIZATION = "pump_optimization"
Expand Down
15 changes: 15 additions & 0 deletions custom_components/luxtronik/number_entities_predefined.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
UnitOfElectricPotential,
UnitOfTemperature,
UnitOfTime,
UnitOfPower
)
from homeassistant.helpers.entity import EntityCategory

Expand All @@ -18,6 +19,7 @@
SensorAttrFormat,
SensorAttrKey as SA,
SensorKey,
FirmwareVersionMinor,
)
from .model import (
LuxtronikEntityAttributeDescription as attr,
Expand Down Expand Up @@ -106,6 +108,19 @@
entity_registry_enabled_default=False,
visibility=LV.V0105_HEAT_SOURCE_INPUT_TEMPERATURE_MIN,
),
LuxtronikNumberDescription(
key=SensorKey.ELECTRICAL_POWER_LIMITATION_VALUE,
luxtronik_key=LP.P1159_POWER_LIMIT_VALUE,
icon="mdi:arrow-collapse-down",
device_class=SensorDeviceClass.POWER,
entity_category=EntityCategory.CONFIG,
native_unit_of_measurement=UnitOfPower.KILO_WATT,
native_min_value=0.0,
native_max_value=30.0,
native_step=0.1,
factor=0.1,
min_firmware_version_minor=FirmwareVersionMinor.minor_90,
),
# endregion Main heatpump
# region Heating
LuxtronikNumberDescription(
Expand Down
10 changes: 5 additions & 5 deletions custom_components/luxtronik/switch_entities_predefined.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
# device_class=SensorDeviceClass.HEAT
),
LuxtronikSwitchDescription(
luxtronik_key=LP.P1087_SILENT_MODE,
key=SensorKey.SILENT_MODE,
icon="mdi:volume-minus",
key=SensorKey.ELECTRICAL_POWER_LIMITATION_SWITCH,
luxtronik_key=LP.P1158_POWER_LIMIT_SWITCH,
icon="mdi:leaf-circle-outline",
entity_category=EntityCategory.CONFIG,
visibility=LV.V0357_SILENT_MODE_TIME_MENU,
min_firmware_version_minor=FirmwareVersionMinor.minor_80,
visibility=LV.V0357_ELECTRICAL_POWER_LIMITATION_SWITCH,
min_firmware_version_minor=FirmwareVersionMinor.minor_90,
update_interval=UPDATE_INTERVAL_VERY_SLOW,
),
# LuxtronikSwitchDescription(
Expand Down
6 changes: 6 additions & 0 deletions custom_components/luxtronik/translations/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
"efficiency_pump": {
"name": "\u00da\u010dinnost \u010derpadla"
},
"electrical_power_limitation_switch": {
"name": "Power limitation"
},
"pump_heat_control": {
"name": "Ovl\u00e1d\u00e1n\u00ed \u010derpadla pro oh\u0159ev"
},
Expand Down Expand Up @@ -104,6 +107,9 @@
},
"pump_optimization": {
"name": "Optimalizace \u010derpadla"
},
"electrical_power_limitation_value": {
"name": "Power limit"
},
"heating_threshold": {
"name": "Teplotn\u00ed mez pro vyt\u00e1p\u011bn\u00ed"
Expand Down
6 changes: 6 additions & 0 deletions custom_components/luxtronik/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
"efficiency_pump": {
"name": "Effizienzpumpe"
},
"electrical_power_limitation_switch": {
"name": "Leistungsbegrenzung"
},
"pump_heat_control": {
"name": "Pumpenheizkontrolle"
},
Expand Down Expand Up @@ -104,6 +107,9 @@
},
"pump_optimization": {
"name": "Pumpenoptimierung"
},
"electrical_power_limitation_value": {
"name": "Leistungslimit"
},
"heating_threshold": {
"name": "Heizgrenze"
Expand Down
6 changes: 6 additions & 0 deletions custom_components/luxtronik/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
"remote_maintenance": {
"name": "Remote maintenance"
},
"electrical_power_limitation_switch": {
"name": "Power limitation"
},
"efficiency_pump": {
"name": "Efficiency pump"
},
Expand Down Expand Up @@ -107,6 +110,9 @@
},
"pump_optimization": {
"name": "Pump optimization"
},
"electrical_power_limitation_value": {
"name": "Power limit"
},
"heating_threshold": {
"name": "Heating threshold"
Expand Down
6 changes: 6 additions & 0 deletions custom_components/luxtronik/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
"efficiency_pump": {
"name": "Efficiëntie Pomp"
},
"electrical_power_limitation_switch": {
"name": "Power limitation"
},
"pump_heat_control": {
"name": "Controle pompverwarming"
},
Expand Down Expand Up @@ -104,6 +107,9 @@
},
"pump_optimization": {
"name": "Pompoptimalisatie"
},
"electrical_power_limitation_value": {
"name": "Power limit"
},
"heating_threshold": {
"name": "Verwarmingslimiet"
Expand Down
6 changes: 6 additions & 0 deletions custom_components/luxtronik/translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
"efficiency_pump": {
"name": "Pompa wydajna"
},
"electrical_power_limitation_switch": {
"name": "Power limitation"
},
"pump_heat_control": {
"name": "Sterowanie ogrzewaniem pompy"
},
Expand Down Expand Up @@ -104,6 +107,9 @@
},
"heating_threshold": {
"name": "Pr\u00F3g ogrzewania"
},
"electrical_power_limitation_value": {
"name": "Power limit"
},
"heating_target_correction": {
"name": "Korekcja celu grzewczego"
Expand Down

0 comments on commit 10d4b69

Please sign in to comment.