Files
ha-xiaoxiang-bms/custom_components/xiaoxiang_bms
Jannis 3fc25c083b Switch to connect→poll→disconnect per cycle (single-connection BMS fix)
The BMS only allows one simultaneous BLE connection. Keeping a persistent
connection blocked the mobile app from connecting at all.

Changes:
- BmsBluetoothHandler: replace connect()/disconnect()/request() public API
  with a single poll() method that owns the full connect→read→disconnect
  lifecycle. Connection is held only for the duration of one data fetch.
- Coordinator: gutted connection-state management — _async_update_data now
  just calls handler.poll() and processes results. No reconnect loop needed.
- Poll interval defaults: 15s default, 10s min, 300s max. The BLE connect
  overhead (~2s) makes sub-10s intervals impractical.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 20:09:43 +02:00
..