What's Changed
Added
-
Add
--saic-user-timezone/SAIC_USER_TIMEZONEconfig option to force the account timezone instead of relying on the SAIC API value. Useful when the API reports a wrong DST offset (#444). Discrepancies between the forced zone and the API value are detected by comparing the current UTC offset and logged at WARNING level. -
Add SoC kWh fallback for vehicles that do not report
realtimePower: the gateway now estimates energy consumed from the SoC delta and battery capacity so the kWh sensors remain populated even without live power data (#448). -
Add battery capacity support for MG4 Urban (AH4EM series) (#455).
-
Default MG4 Urban non-Long-Range variants to 54 kWh when no custom override is configured (#452).
-
Home Assistant SoC icon now dynamically reflects the charging state (charging / discharging / idle) (#458).
Fixed
-
Persist user-set HA gateway entities across gateway restarts by retaining their
/setcommands on the MQTT broker (refresh mode, all four refresh periods, and total battery capacity). On reconnect the existing command-dispatch path replays the retained value beforeconfigure_missing()would apply config defaults. A retained one-shot refresh mode (force,charging_detection) is dropped on replay so a single-shot poll does not fire on every restart.Note: on first upgrade only entities you change after the upgrade become persistent. Existing retained STATE values on the broker are not converted into retained
/setcommands. (#441) -
Forward the retain flag through all typed publish methods so that retained state is correctly preserved on the broker across reconnects (#443).
-
Republish the effective Total Battery Capacity to its state topic right after the user updates the HA number. The handler used to only mutate the in-memory override and rely on the next vehicle poll to refresh the shared sensor topic, leaving the HA sensor stuck on the previous value. A payload of
0re-publishes the per-model default (#445).
Full Changelog: 0.11.0...0.12.0