EV-03: car charger seam, Alfen HA driver, read-only Car card
Read-only: nothing in this change writes to the charger. - app/chargers.py: ChargerDriver, AlfenHaDriver, UnavailableCharger, ChargerReading, CarTracker - options ev_charger/ev_current_entity/ev_max_a/ev_phases (default off), Settings group, validator, census - Car card on Home, unreachable row and notification, two-writer info row, MQTT sensors - car out of the House tile and the house profile - tools/chargersim.py charger model, test_ev03.py Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -186,6 +186,8 @@ T_OUTPUT_CLAMP_NL = "Vermogensvraag te hoog"
|
||||
T_PEAK_SATURATED_NL = "Belasting te hoog voor de batterij"
|
||||
T_METER_FROZEN_NL = "Meter staat mogelijk vast"
|
||||
TITLE_NL = {T_LOOP_BOUND: T_LOOP_BOUND_NL, T_OUTPUT_CLAMP: T_OUTPUT_CLAMP_NL}
|
||||
T_CHARGER_UNREACH = "Charger not reachable"
|
||||
T_CHARGER_UNREACH_NL = "Laadpaal onbereikbaar"
|
||||
T_NO_PRICES = "No prices"
|
||||
T_NO_PRICES_NL = "Prijzen ontbreken"
|
||||
|
||||
@@ -198,6 +200,7 @@ ID_NOT_DELIVERING = "goodwe_not_delivering_{slug}"
|
||||
ID_METER_FROZEN = "goodwe_meter_frozen"
|
||||
ID_MAINT_FAILED = "goodwe_maint_failed_{slug}"
|
||||
ID_NO_PRICES = "goodwe_no_prices"
|
||||
ID_CHARGER_UNREACH = "goodwe_charger_unreachable"
|
||||
# PRICE-01: an earlier build raised a card with this id. Nothing raises it now;
|
||||
# the add-on only dismisses it at start.
|
||||
OLD_FIXED_CARD_ID = "goodwe_fixed_tariff_unused"
|
||||
@@ -465,6 +468,43 @@ def row_no_prices(since=None, now=None) -> str:
|
||||
"Nog geen prijzen, onderhoud wacht.")
|
||||
|
||||
|
||||
def charger_unreachable(since_text_, brand="Alfen") -> Notice:
|
||||
"""EV-03: the car charger has not answered for 5 minutes. Said once."""
|
||||
en = (f"The add-on cannot reach the car charger since {since_text_}, so "
|
||||
f"check the {brand} integration in Home Assistant.")
|
||||
nl = (f"De add-on kan de laadpaal niet bereiken sinds {since_text_}, dus "
|
||||
f"controleer de {brand}-integratie in Home Assistant.")
|
||||
return Notice(ID_CHARGER_UNREACH, WARNING, T_CHARGER_UNREACH, en,
|
||||
body_nl=f"{T_CHARGER_UNREACH_NL}. {nl}")
|
||||
|
||||
|
||||
def charger_back() -> Dismiss:
|
||||
"""EV-03: takes the 'Charger not reachable' notification down."""
|
||||
return Dismiss(ID_CHARGER_UNREACH)
|
||||
|
||||
|
||||
def row_charger_unreach(since_text_) -> str:
|
||||
"""EV-03: the amber row while the charger does not answer."""
|
||||
return Bi(f"The add-on cannot reach the charger since {since_text_}.",
|
||||
f"De add-on kan de laadpaal niet bereiken sinds {since_text_}.")
|
||||
|
||||
|
||||
def row_charger_writer() -> str:
|
||||
"""EV-03: the grey row while something else sets the charger's current."""
|
||||
return Bi("Something else changes the charger, and this add-on only reads "
|
||||
"it.",
|
||||
"Iets anders wijzigt de laadpaal en deze add-on leest alleen.")
|
||||
|
||||
|
||||
def row_charger_setup() -> str:
|
||||
"""EV-03: the amber row when the charger's entities are not found."""
|
||||
return Bi("The add-on cannot find the charger, so check its entity in "
|
||||
"Settings.",
|
||||
"De add-on vindt de laadpaal niet, dus controleer de entiteit "
|
||||
"bij Instellingen.")
|
||||
|
||||
|
||||
|
||||
def row_maint_waits(until_text: str) -> str:
|
||||
"""MAINT-13: the status row while a failed cycle waits."""
|
||||
return Bi(f"Waits until {until_text} after a cycle that did not finish.",
|
||||
@@ -1661,6 +1701,9 @@ def status_samples() -> list:
|
||||
("row_no_prices", AMBER, row_no_prices(*_SINCE_SAMPLE)),
|
||||
("row_no_prices", AMBER, row_no_prices(*_SINCE_OLDER)),
|
||||
("row_no_prices", AMBER, row_no_prices()),
|
||||
("row_charger_unreach", AMBER, row_charger_unreach("09:12")),
|
||||
("row_charger_writer", GREEN, row_charger_writer()),
|
||||
("row_charger_setup", AMBER, row_charger_setup()),
|
||||
]
|
||||
|
||||
|
||||
@@ -1696,6 +1739,7 @@ def samples() -> list:
|
||||
no_prices(*_SINCE_SAMPLE),
|
||||
no_prices(*_SINCE_OLDER),
|
||||
no_prices(),
|
||||
charger_unreachable("09:12"),
|
||||
]
|
||||
|
||||
|
||||
@@ -1758,6 +1802,11 @@ LABELS = {
|
||||
"solar_trust_pct": "Trust in the forecast",
|
||||
"p1_phase_import_entities": "Import entities per phase",
|
||||
"p1_phase_export_entities": "Export entities per phase",
|
||||
# EV-03
|
||||
"ev_charger": "Charger",
|
||||
"ev_current_entity": "Current setting entity",
|
||||
"ev_max_a": "Charger limit",
|
||||
"ev_phases": "Phases",
|
||||
}
|
||||
|
||||
|
||||
@@ -1838,6 +1887,10 @@ LABELS_NL = {
|
||||
"solar_trust_pct": "Vertrouwen in de prognose",
|
||||
"p1_phase_import_entities": "Afname-entiteiten per fase",
|
||||
"p1_phase_export_entities": "Injectie-entiteiten per fase",
|
||||
"ev_charger": "Laadpaal",
|
||||
"ev_current_entity": "Entiteit van de laadstroom",
|
||||
"ev_max_a": "Laadpaalgrens",
|
||||
"ev_phases": "Fasen",
|
||||
}
|
||||
# The inverter list shows two of them under a shorter name.
|
||||
UNIT_LABELS_NL = {"setpoint_entity": "Setpoint-entiteit",
|
||||
|
||||
Reference in New Issue
Block a user