Looking at the prebat.py 4.0 source, I can't see any code to handle the responses listed in apps.yaml? Am I missing some aspect to how the car charging prediction now works?
Setting the car_charging_planned to a sensor results in:
INFO pred_bat: WARN: Return bad int value EV Disconnected from car_charging_planned
2023-06-02 12:14:21.136105 INFO pred_bat: Previous message repeated 848 times
apps.yaml
car_charging_planned_response:
- 'yes'
- 'on'
- 'true'
- 'connected'
- 'ev connected'
- 'charging'
- 'paused'
- 'waiting for car demand'
- 'scheduled'
- 'enabled'
- 'latched'
- 'locked'
- 'plugged in'
predbat.py:
planned = self.get_arg('car_charging_planned', False)
if isinstance(planned, str):
if planned.lower() in self.get_arg('car_charging_planned_response', ['yes', 'on', 'enable', 'true']):
planned = True
else:
planned = False
Looking at the prebat.py 4.0 source, I can't see any code to handle the responses listed in apps.yaml? Am I missing some aspect to how the car charging prediction now works?
Setting the car_charging_planned to a sensor results in:
INFO pred_bat: WARN: Return bad int value EV Disconnected from car_charging_planned
2023-06-02 12:14:21.136105 INFO pred_bat: Previous message repeated 848 times
apps.yaml
car_charging_planned_response:
- 'yes'
- 'on'
- 'true'
- 'connected'
- 'ev connected'
- 'charging'
- 'paused'
- 'waiting for car demand'
- 'scheduled'
- 'enabled'
- 'latched'
- 'locked'
- 'plugged in'
predbat.py:
planned = self.get_arg('car_charging_planned', False)
if isinstance(planned, str):
if planned.lower() in self.get_arg('car_charging_planned_response', ['yes', 'on', 'enable', 'true']):
planned = True
else:
planned = False