diff --git a/custom_components/luxtronik/const.py b/custom_components/luxtronik/const.py index 65f7600..52c31f0 100644 --- a/custom_components/luxtronik/const.py +++ b/custom_components/luxtronik/const.py @@ -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" @@ -378,6 +379,9 @@ class LuxParameter(StrEnum): P1032_HEATING_MAXIMUM_CIRCULATION_PUMP_SPEED: Final = ( "parameters.ID_Einst_P155_PumpHeat_Max" ) + P1030_SMART_GRID_SWITCH: Final = ( + "parameters.ID_Einst_SmartGrid" + ) P1033_PUMP_HEAT_CONTROL: Final = "parameters.ID_Einst_P155_PumpHeatCtrl" P1059_ADDITIONAL_HEAT_GENERATOR_AMOUNT_COUNTER: Final = ( "parameters.ID_Waermemenge_ZWE" @@ -393,7 +397,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 @@ -577,7 +582,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 @@ -650,6 +655,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" @@ -717,6 +724,7 @@ class SensorKey(StrEnum): COOLING_TARGET_TEMPERATURE_MK1 = "cooling_target_temperature_mk1" COOLING_TARGET_TEMPERATURE_MK2 = "cooling_target_temperature_mk2" COOLING_TARGET_TEMPERATURE_MK3 = "cooling_target_temperature_mk3" + SMART_GRID_SWITCH = "smartgrid" SWITCHOFF_REASON = "switchoff_reason" SILENT_MODE = "silent_mode" diff --git a/custom_components/luxtronik/number_entities_predefined.py b/custom_components/luxtronik/number_entities_predefined.py index 46a5491..f4ba925 100644 --- a/custom_components/luxtronik/number_entities_predefined.py +++ b/custom_components/luxtronik/number_entities_predefined.py @@ -7,6 +7,7 @@ UnitOfElectricPotential, UnitOfTemperature, UnitOfTime, + UnitOfPower, ) from homeassistant.helpers.entity import EntityCategory @@ -18,6 +19,7 @@ SensorAttrFormat, SensorAttrKey as SA, SensorKey, + FirmwareVersionMinor, ) from .model import ( LuxtronikEntityAttributeDescription as attr, @@ -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( diff --git a/custom_components/luxtronik/switch_entities_predefined.py b/custom_components/luxtronik/switch_entities_predefined.py index f11fe10..726e4fc 100644 --- a/custom_components/luxtronik/switch_entities_predefined.py +++ b/custom_components/luxtronik/switch_entities_predefined.py @@ -30,6 +30,12 @@ entity_category=EntityCategory.CONFIG, entity_registry_enabled_default=False, # device_class=SensorDeviceClass.HEAT + ), + LuxtronikSwitchDescription( + key=SensorKey.SMART_GRID_SWITCH, + luxtronik_key=LP.P1030_SMART_GRID_SWITCH, + icon="mdi:grid", + entity_category=EntityCategory.CONFIG, ), LuxtronikSwitchDescription( luxtronik_key=LP.P1033_PUMP_HEAT_CONTROL, @@ -40,13 +46,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, - update_interval=UPDATE_INTERVAL_VERY_SLOW, + visibility=LV.V0357_ELECTRICAL_POWER_LIMITATION_SWITCH, + min_firmware_version_minor=FirmwareVersionMinor.minor_90, ), # LuxtronikSwitchDescription( # luxtronik_key=LP.P0870_AMOUNT_COUNTER_ACTIVE, diff --git a/custom_components/luxtronik/translations/cs.json b/custom_components/luxtronik/translations/cs.json index 9c4e68f..7710333 100644 --- a/custom_components/luxtronik/translations/cs.json +++ b/custom_components/luxtronik/translations/cs.json @@ -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" }, @@ -91,7 +94,10 @@ }, "cooling": { "name": "Chlazen\u00ed" - } + }, + "smartgrid": { + "name": "Smart Grid" + } }, "update": { "firmware": { @@ -104,6 +110,9 @@ }, "pump_optimization": { "name": "Optimalizace \u010derpadla" + }, + "electrical_power_limitation_value": { + "name": "Power limit" }, "heating_threshold": { "name": "Teplotn\u00ed mez pro vyt\u00e1p\u011bn\u00ed" diff --git a/custom_components/luxtronik/translations/de.json b/custom_components/luxtronik/translations/de.json index 8fe8d99..57110eb 100644 --- a/custom_components/luxtronik/translations/de.json +++ b/custom_components/luxtronik/translations/de.json @@ -74,6 +74,9 @@ "efficiency_pump": { "name": "Effizienzpumpe" }, + "electrical_power_limitation_switch": { + "name": "Leistungsbegrenzung" + }, "pump_heat_control": { "name": "Pumpenheizkontrolle" }, @@ -91,7 +94,11 @@ }, "cooling": { "name": "K\u00fchlung" + }, + "smartgrid": { + "name": "Smart Grid" } + }, "update": { "firmware": { @@ -104,6 +111,9 @@ }, "pump_optimization": { "name": "Pumpenoptimierung" + }, + "electrical_power_limitation_value": { + "name": "Leistungslimit" }, "heating_threshold": { "name": "Heizgrenze" diff --git a/custom_components/luxtronik/translations/en.json b/custom_components/luxtronik/translations/en.json index d4ce776..6dd9fa5 100644 --- a/custom_components/luxtronik/translations/en.json +++ b/custom_components/luxtronik/translations/en.json @@ -71,6 +71,9 @@ "remote_maintenance": { "name": "Remote maintenance" }, + "electrical_power_limitation_switch": { + "name": "Power limitation" + }, "efficiency_pump": { "name": "Efficiency pump" }, @@ -94,7 +97,10 @@ }, "silent_mode": { "name": "Silent mode" - } + }, + "smartgrid": { + "name": "Smart Grid" + } }, "update": { "firmware": { @@ -107,6 +113,9 @@ }, "pump_optimization": { "name": "Pump optimization" + }, + "electrical_power_limitation_value": { + "name": "Power limit" }, "heating_threshold": { "name": "Heating threshold" diff --git a/custom_components/luxtronik/translations/nl.json b/custom_components/luxtronik/translations/nl.json index ee1bbdf..b8e095d 100644 --- a/custom_components/luxtronik/translations/nl.json +++ b/custom_components/luxtronik/translations/nl.json @@ -74,6 +74,9 @@ "efficiency_pump": { "name": "Efficiƫntie Pomp" }, + "electrical_power_limitation_switch": { + "name": "Power limitation" + }, "pump_heat_control": { "name": "Controle pompverwarming" }, @@ -91,7 +94,10 @@ }, "cooling": { "name": "Koeling" - } + }, + "smartgrid": { + "name": "Smart Grid" + } }, "update": { "firmware": { @@ -104,6 +110,9 @@ }, "pump_optimization": { "name": "Pompoptimalisatie" + }, + "electrical_power_limitation_value": { + "name": "Power limit" }, "heating_threshold": { "name": "Verwarmingslimiet" diff --git a/custom_components/luxtronik/translations/pl.json b/custom_components/luxtronik/translations/pl.json index 5ff8f77..e17a2fe 100644 --- a/custom_components/luxtronik/translations/pl.json +++ b/custom_components/luxtronik/translations/pl.json @@ -71,6 +71,9 @@ "efficiency_pump": { "name": "Pompa wydajna" }, + "electrical_power_limitation_switch": { + "name": "Power limitation" + }, "pump_heat_control": { "name": "Sterowanie ogrzewaniem pompy" }, @@ -88,7 +91,10 @@ }, "cooling": { "name": "Ch\u0142odzenie" - } + }, + "smartgrid": { + "name": "Smart Grid" + } }, "update": { "firmware": { @@ -104,6 +110,9 @@ }, "heating_threshold": { "name": "Pr\u00F3g ogrzewania" + }, + "electrical_power_limitation_value": { + "name": "Power limit" }, "heating_target_correction": { "name": "Korekcja celu grzewczego"