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:
@@ -82,7 +82,7 @@ import os
|
||||
|
||||
import aiohttp
|
||||
|
||||
from . import messages
|
||||
from . import chargers, messages
|
||||
from .configui import changed_keys
|
||||
from .inverter import build_roster
|
||||
from .validate import validate_startup_config, validate_unit_ranges
|
||||
@@ -362,6 +362,18 @@ async def problems_and_ranges(opts: dict, hass=None, notes=None):
|
||||
unread = [unit.driver.actuator_id() for unit in units
|
||||
if unit.driver.configured() and unit.dev_min is None
|
||||
and unit.dev_max is None]
|
||||
# EV-03: the charger limit may not exceed the station limit the charger
|
||||
# reports. A read only; a charger that does not answer skips the check.
|
||||
if hass is not None and chargers.mode_of(opts) != chargers.OFF:
|
||||
drv = chargers.build(opts)
|
||||
if drv.configured():
|
||||
_lo, station, _ph = await drv.bind(hass).limits()
|
||||
amps = chargers.max_a(opts)
|
||||
if station is not None and amps is not None and amps > station:
|
||||
problems.append(
|
||||
f"{messages.setting('ev_max_a')} is {amps:.0f} A, but the "
|
||||
f"charger allows at most {station:.0f} A. Lower it to "
|
||||
f"{station:.0f} A or less.")
|
||||
return problems, unread
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user