Fix setup failure when BMS not immediately reachable

Don't connect eagerly in async_setup — let the first coordinator poll
handle it. If the BMS is out of range at startup, UpdateFailed becomes
ConfigEntryNotReady and HA retries automatically instead of crashing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-11 19:37:54 +02:00
parent db45679c12
commit 78c8a23131
@@ -50,8 +50,7 @@ class BmsCoordinator(DataUpdateCoordinator[dict]):
return device
async def async_setup(self) -> None:
"""Connect to the BMS. Called once during config entry setup."""
await self._handler.connect(self._get_ble_device())
"""No-op — connection is established lazily on the first poll."""
async def async_teardown(self) -> None:
"""Disconnect cleanly. Called on entry unload."""