EV-52: log one plain line for a new car current and for a car mode change
Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
This commit is contained in:
@@ -88,6 +88,9 @@ class CarMixin:
|
||||
ok = carmode.allowed_phases(opts)
|
||||
self.car_n = n if n in ok else ok[0]
|
||||
self.car_rev = 0
|
||||
if self.charger.configured(): # EV-52: the mode at the start
|
||||
_LOG.info("Car mode is now %s.",
|
||||
carmode.MODE_LABELS[self.car_mode])
|
||||
self.car_writer = carmode.ManualWriter()
|
||||
self.car_solar = carmode.SolarWriter() # EV-20
|
||||
self.car_solar.on_owed = self._car_owed
|
||||
@@ -476,6 +479,8 @@ class CarMixin:
|
||||
# A Manual phase change in the middle is not restored: Solar
|
||||
# starts from the 0 A it stands at.
|
||||
self.car_writer.seq = None
|
||||
if value != self.car_mode: # EV-52: one plain line
|
||||
_LOG.info("Car mode is now %s.", carmode.MODE_LABELS[value])
|
||||
self.car_mode = value
|
||||
self.store.set(carmode.KEY_MODE, value)
|
||||
elif what == "car_sun_first":
|
||||
|
||||
Reference in New Issue
Block a user