EV-03: car charger seam, Alfen HA driver, read-only Car card
checks / unit (pull_request) Failing after 37m42s
infra-pin / fresh (pull_request) Successful in 2s

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:
ev03-dev
2026-11-15 09:52:15 +01:00
co-authored by Claude
parent 6bf37597f8
commit 89a2eb0b74
30 changed files with 2656 additions and 23 deletions
+11 -1
View File
@@ -51,7 +51,8 @@ from aiohttp import web
from . import messages, price, selfconfig, uipage, uitext
from .haentities import EntityCache
from .homeview import priced_hours, region_of
from .validate import config_notes, note_text, setup_checks
from .validate import (charger_probe_for, config_notes, note_text,
setup_checks)
from .config_page import CONFIG_PAGE
from .configui import (changed_keys, field_model, hide_secrets, keep_secrets,
problems_by_field, secret_keys)
@@ -474,6 +475,14 @@ def build_app(controller, selfcfg=None) -> web.Application:
return web.json_response(await entities.reading(one))
return web.json_response(await entities.payload(kind))
async def config_charger(request):
"""EV-03: the settings page's read-only look at the car charger: which
entities Home Assistant has and which it lacks. Reads the cached entity
list and writes nothing, anywhere."""
rows, _age = await entities.get(max_age=5.0)
return web.json_response(charger_probe_for(
str(request.query.get("entity") or "")[:255], rows))
app = web.Application()
app.add_routes([
web.get("/", index),
@@ -486,6 +495,7 @@ def build_app(controller, selfcfg=None) -> web.Application:
web.post("/config/save", config_save),
web.post("/config/restart", config_restart),
web.get("/ha/entities", ha_entities),
web.get("/config/charger", config_charger),
])
return app