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:
@@ -388,8 +388,18 @@ class TradeMixin:
|
||||
price_now = None
|
||||
house = (None if self.grid is None or self.site_batt_w is None
|
||||
else float(self.grid) + float(self.site_batt_w))
|
||||
# EV-03: the car is not the house. Out of the profile that plans the
|
||||
# batteries' night charge; with a charger whose reading is not fresh
|
||||
# the moment is left out (None), not guessed.
|
||||
# ONLY the profile's sample: `house` below stays what it was, since
|
||||
# the battery decision's input is not part of this card.
|
||||
house_sample = house
|
||||
if house is not None:
|
||||
_car_w, _car_unknown = self.car_term()
|
||||
house_sample = (None if _car_unknown else max(0.0, house - _car_w)
|
||||
if _car_w else house)
|
||||
if self.house_profile is not None and \
|
||||
self.house_profile.add(now, house):
|
||||
self.house_profile.add(now, house_sample):
|
||||
self.store.set(HOUSE_PROFILE_KEY, self.house_profile.dump())
|
||||
targets = self.plan_targets()
|
||||
if targets is None:
|
||||
|
||||
Reference in New Issue
Block a user