Skip to content

Commit a169637

Browse files
author
marq24
committed
added 'smartFeedInPriorityLimit' & 'smartFeedInPriorityActive'
1 parent 2e1fd14 commit a169637

6 files changed

Lines changed: 47 additions & 8 deletions

File tree

custom_components/evcc_intg/const.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,13 @@ class ExtSwitchEntityDescription(SwitchEntityDescription):
231231
icon=None,
232232
icon_off=None
233233
),
234+
ExtBinarySensorEntityDescriptionStub(
235+
tag=Tag.SMARTFEEDINPRIORITYACTIVE,
236+
entity_category=EntityCategory.DIAGNOSTIC,
237+
icon=None,
238+
icon_off=None,
239+
entity_registry_enabled_default=False
240+
),
234241
ExtBinarySensorEntityDescriptionStub(
235242
tag=Tag.LP_VEHICLEDETECTIONACTIVE,
236243
entity_category=EntityCategory.DIAGNOSTIC,
@@ -306,8 +313,14 @@ class ExtSwitchEntityDescription(SwitchEntityDescription):
306313
entity_category=EntityCategory.CONFIG,
307314
device_class=None,
308315
icon = "mdi:cash-off",
309-
entity_registry_enabled_default=False,
310-
integrated_supported = False
316+
entity_registry_enabled_default=False
317+
),
318+
ExtButtonEntityDescriptionStub(
319+
tag=Tag.SMARTFEEDINPRIORITYLIMIT,
320+
entity_category=EntityCategory.CONFIG,
321+
device_class=None,
322+
icon = "mdi:cash-off",
323+
entity_registry_enabled_default=False
311324
)
312325
]
313326

@@ -391,6 +404,17 @@ class ExtSwitchEntityDescription(SwitchEntityDescription):
391404
native_step=0.005,
392405
native_unit_of_measurement="@@@/kWh",
393406
),
407+
ExtNumberEntityDescriptionStub(
408+
tag=Tag.SMARTFEEDINPRIORITYLIMIT,
409+
entity_category=EntityCategory.CONFIG,
410+
icon = "mdi:cash-multiple",
411+
mode = NumberMode.BOX,
412+
native_max_value=2.50,
413+
native_min_value=-0.50,
414+
native_step=0.005,
415+
native_unit_of_measurement="@@@/kWh",
416+
entity_registry_enabled_default=False
417+
),
394418
ExtNumberEntityDescriptionStub(
395419
tag=Tag.ENABLEDELAY,
396420
entity_category=EntityCategory.CONFIG,

custom_components/evcc_intg/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
"iot_class": "local_push",
1212
"issue_tracker": "https://github.com/marq24/ha-evcc/issues",
1313
"requirements": ["packaging>=21.0"],
14-
"version": "2026.5.8"
14+
"version": "2026.5.9"
1515
}

custom_components/evcc_intg/number.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, add_
6969
step=a_stub.step,
7070
)
7171

72-
if a_stub.tag == Tag.SMARTCOSTLIMIT or a_stub.tag == Tag.BATTERYGRIDCHARGELIMIT:
72+
if a_stub.tag in [Tag.SMARTCOSTLIMIT, Tag.SMARTFEEDINPRIORITYLIMIT, Tag.BATTERYGRIDCHARGELIMIT]:
7373
if coordinator._cost_type == "co2":
7474
description = replace(
7575
description,
@@ -106,7 +106,7 @@ def native_value(self):
106106
if value is None or value == "":
107107
return "unknown"
108108
else:
109-
if self.tag == Tag.SMARTCOSTLIMIT or self.tag == Tag.BATTERYGRIDCHARGELIMIT:
109+
if self.tag in [Tag.SMARTCOSTLIMIT, Tag.SMARTFEEDINPRIORITYLIMIT, Tag.BATTERYGRIDCHARGELIMIT]:
110110
value = round(float(value), 3)
111111
else:
112112
value = int(value)
@@ -126,7 +126,7 @@ def native_value(self):
126126

127127
async def async_set_native_value(self, value) -> None:
128128
try:
129-
if self.tag == Tag.SMARTCOSTLIMIT or self.tag == Tag.BATTERYGRIDCHARGELIMIT:
129+
if self.tag in [Tag.SMARTCOSTLIMIT, Tag.SMARTFEEDINPRIORITYLIMIT, Tag.BATTERYGRIDCHARGELIMIT]:
130130
await self.coordinator.async_write_tag(self.tag, round(float(value), 3), self.lp_idx, self)
131131
else:
132132
await self.coordinator.async_write_tag(self.tag, int(value), self.lp_idx, self)

custom_components/evcc_intg/pyevcc_ha/keys.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,13 @@ def __str__(self):
322322
# "smartCostLimit": 0.22,
323323
SMARTCOSTLIMIT = ApiKey(json_key="smartCostLimit", type=EP_TYPE.LOADPOINTS, writeable=True, write_key="smartcostlimit")
324324

325+
# "smartFeedInPriorityActive": false,
326+
SMARTFEEDINPRIORITYACTIVE = ApiKey(json_key="smartFeedInPriorityActive", type=EP_TYPE.LOADPOINTS)
327+
328+
# "smartFeedInPriorityLimit": null,
329+
SMARTFEEDINPRIORITYLIMIT = ApiKey(json_key="smartFeedInPriorityLimit", type=EP_TYPE.LOADPOINTS, writeable=True, write_key="smartfeedinprioritylimit")
330+
331+
325332
# "title": "HH-7",
326333
# -> USED during startup phase
327334

custom_components/evcc_intg/translations/de.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"connected": {"name": "Verbunden"},
7575
"enabled": {"name": "Aktiviert"},
7676
"smartcostactive": {"name": "Smartes Netzladen"},
77+
"smartfeedinpriorityactive": {"name": "Smarte Einspeisegrenze"},
7778
"vehicledetectionactive": {"name": "Fahrzeugerkennung"},
7879
"batterygridchargeactive": {"name": "Hausbatterie: Netzladen"},
7980
"vehicleclimateractive": {"name": "Fahrzeug Klimatisierung"},
@@ -88,7 +89,8 @@
8889
"vehicleplansdelete": {"name": "Ladeplanung: Abfahrt löschen (Fahrzeug/SOC)"},
8990
"plandelete": {"name": "Ladeplanung: Abfahrt löschen (Ladepunkt/Energie)"},
9091
"detectvehicle": {"name": "Fahrzeugerkennung starten"},
91-
"smartcostlimit": {"name": "@@@ Limit entfernen"}
92+
"smartcostlimit": {"name": "@@@ Limit entfernen"},
93+
"smartfeedinprioritylimit": {"name": "@@@ Einspeisegrenze entfernen"}
9294
},
9395
"number": {
9496
"limitsoc": {"name": "Standard Ladelimit (SOC)"},
@@ -98,6 +100,8 @@
98100
"residualpower": {"name": "Restleistung"},
99101
"smartcostlimit_co2": {"name": "CO₂ Limit ≤"},
100102
"smartcostlimit": {"name": "@@@ Limit ≤"},
103+
"smartfeedinprioritylimit_co2": {"name": "CO₂ Einspeisegrenze ≤"},
104+
"smartfeedinprioritylimit": {"name": "@@@ Einspeisegrenze ≤"},
101105
"batterygridchargelimit": {"name": "Hausbatterie: Netzladen @@@ Limit ≤"},
102106
"enabledelay": {"name": "Verzögerung Aktivierung"},
103107
"disabledelay": {"name": "Verzögerung Deaktivierung"},

custom_components/evcc_intg/translations/en.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"connected": {"name": "Connected"},
7575
"enabled": {"name": "Enabled"},
7676
"smartcostactive": {"name": "Smart Grid Charging"},
77+
"smartfeedinpriorityactive": {"name": "Smart Feedin limit"},
7778
"vehicledetectionactive": {"name": "Vehicle detection"},
7879
"batterygridchargeactive": {"name": "Home-Battery: grid charging"},
7980
"vehicleclimateractive": {"name": "Vehicle Air Conditioning"},
@@ -88,7 +89,8 @@
8889
"vehicleplansdelete": {"name": "Charging plan: Delete Departure (Vehicle/SOC)"},
8990
"plandelete": {"name": "Charging plan: Delete Departure (Loadpoint/Energy)"},
9091
"detectvehicle": {"name": "Start vehicle detection"},
91-
"smartcostlimit": {"name": "@@@ Limit remove"}
92+
"smartcostlimit": {"name": "@@@ Limit remove"},
93+
"smartfeedinprioritylimit": {"name": "@@@ Feedin limit remove"}
9294
},
9395
"number": {
9496
"limitsoc": {"name": "Default Charging limit (SOC)"},
@@ -98,6 +100,8 @@
98100
"residualpower": {"name": "Residual power"},
99101
"smartcostlimit_co2": {"name": "CO₂ limit ≤"},
100102
"smartcostlimit": {"name": "@@@ limit ≤"},
103+
"smartfeedinprioritylimit_co2": {"name": "CO₂ Feedin limit ≤"},
104+
"smartfeedinprioritylimit": {"name": "@@@ Feedin limit ≤"},
101105
"batterygridchargelimit": {"name": "Home-Battery: grid charging @@@ limit ≤"},
102106
"enabledelay": {"name": "Delay Enable"},
103107
"disabledelay": {"name": "Delay Disable"},

0 commit comments

Comments
 (0)