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:
@@ -401,6 +401,29 @@ class AlarmsMixin:
|
||||
await self.hass.call("persistent_notification", "dismiss",
|
||||
messages.prices_back().data())
|
||||
|
||||
async def check_charger(self) -> None:
|
||||
"""EV-03. One warning notification when the car charger has not
|
||||
answered for 5 minutes, taken down when it does; the WARNING log line
|
||||
is edge-logged. READ ONLY: this raises a notification and calls no
|
||||
service on the charger."""
|
||||
if not self.charger.configured():
|
||||
return
|
||||
now = self.car_now()
|
||||
self.car_log_edges(now)
|
||||
if self.car.notify_due(now) and not self._car_announced:
|
||||
self._car_announced = True
|
||||
self.car.notified = True
|
||||
since = brussels(self.car.bad_since_utc)
|
||||
await self.hass.call("persistent_notification", "create",
|
||||
messages.charger_unreachable(
|
||||
f"{since:%H:%M}",
|
||||
self.charger.brand or "Alfen").data())
|
||||
elif self.car.bad_since is None and self._car_announced:
|
||||
self._car_announced = False
|
||||
self.car.notified = False
|
||||
await self.hass.call("persistent_notification", "dismiss",
|
||||
messages.charger_back().data())
|
||||
|
||||
async def check_fixed_note(self) -> None:
|
||||
"""PRICE-01 G1. First cycle only: one INFO line when `static_profile`
|
||||
sits beside `price_service` (the plan's last fallback, not a fault, so
|
||||
|
||||
Reference in New Issue
Block a user