Closed denisfrench closed 8 months ago
Hi @denisfrench
this is a valid point, thank you! I will force the refresh whenever a chargingValue is received that is different from the last received value.
Thanks for coming up with the solution so quickly!
Apologies for not providing feedback sooner, which was complicated by my setup which resulted in a race condition that I had to work through.
I've developed a workaround which unfortunately required disabling charging_stations.json and instead using HA automations.
To be clear; this issue/FR is not the root cause. I'll therefore close this issue as fixed.
Expected behaviour:
When the gateway receives a payload on the
chargeStateTopic
topic that is not equal tochargingValue
, thebinary_sensor.<REDACTED>_battery_charging
sensor should be changed to off, and/or a forced refresh performed to confirm the vehicle charging state.Actual behaviour:
A payload that is not equal to
chargingValue
does not appear to change any sensors, or force a refresh. The gateway logs and HA sensors continue to indicate the vehicle is charging until the next periodic update. At low charge rates (eg when linked to solar output) it may take 20mins or half an hour for the gateway and sensors to be re-synced with the vehicle state.System:
SAIC MQTT Gateway (Python) version: 0.4.6 Core 2023.12.4 Supervisor 2023.12.0 Operating System 11.2 MG4 77kWh
Log extract:
Vehicle had been charging (payload 3). Charging was disabled from OpenEVSE web interface (payload 254), with no change in sensor state or forced update.
It would be very helpful for the
binary_sensor.<REDACTED>_battery_charging
sensor to be updated by the charging_stations.json implementation in near-realtime, to provide immediate feedback when charging is stopped. I have created a dashboard within HA to improve on the phone app and get around the single user problem, but at this time the dashbaord is put out of sync with the vehicle state whenever charging is stopped.