Files
andreas 72487cfdc4 li3: correct status gate and current scaling; harden BLE/MQTT recovery
- status gate and decode_status now both key off one parsed int
  (0 == OK in any repr; unparseable = unreliable), so they can't diverge
  on "0"/"00"/"0000"
- main-pack current parsed at its real 0.1 A scale (was raw)
- run `systemctl restart bluetooth` + settle delay off the event loop
  (asyncio.to_thread, timeout=30; errors logged, not fatal); call site awaits
- bounded MQTT startup: exit (let systemd restart) if broker never connects
  within MQTT_STARTUP_TIMEOUT_S
- re-assert HA discovery on every (re)connect so entities survive a
  mosquitto restart that drops retained config
- expire_after *4 -> *8 so routine scan misses don't flap the battery
  to unavailable
2026-09-27 09:55:18 -04:00
..