Do not raise ConfigEntryNotReady when dongle is not yet visible #7

Merged
tim merged 1 commit from fix/no-setup-backoff into main 2026-10-15 10:17:04 +00:00
Owner

When the dongle is not in the bluetooth cache at setup (car away, e.g. after an HA restart or proxy reconnect), async_setup_entry raised ConfigEntryNotReady. HA's setup backoff grows to 600s, so the first connection after the car returned could take several minutes (seen 2026-10-13 14:08 to 14:41).

The coordinator already handles api._ble_device is None (xs_poll, returns {}) and the advertisement callback triggers a refresh as soon as the dongle shows up. So setup now continues with a debug log instead of raising.

Verified on the HA host (deployed 2026-10-15 12:12): loaded clean, entry set up while the dongle was away, zero Could not find OBDBLE device / ConfigEntryNotReady lines. Arrival-to-first-value delay is still pending the next return home. No test suite in the repo; only py_compile.

Rollback: restore the previous __init__.py.

🤖 Generated with Claude Code

When the dongle is not in the bluetooth cache at setup (car away, e.g. after an HA restart or proxy reconnect), `async_setup_entry` raised `ConfigEntryNotReady`. HA's setup backoff grows to 600s, so the first connection after the car returned could take several minutes (seen 2026-10-13 14:08 to 14:41). The coordinator already handles `api._ble_device is None` (xs_poll, returns `{}`) and the advertisement callback triggers a refresh as soon as the dongle shows up. So setup now continues with a debug log instead of raising. Verified on the HA host (deployed 2026-10-15 12:12): loaded clean, entry set up while the dongle was away, zero `Could not find OBDBLE device` / ConfigEntryNotReady lines. Arrival-to-first-value delay is still pending the next return home. No test suite in the repo; only py_compile. Rollback: restore the previous `__init__.py`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Do not raise ConfigEntryNotReady when dongle is not yet visible
All checks were successful
CI / Lint (pull_request) Successful in 9s
Hassfest / Validate integration (pull_request) Successful in 12s
Security / Security scan (pull_request) Successful in 12s
aa2aa1f8a6
HA's setup backoff (up to 600s) delayed the first connection after the car
returned. The coordinator already handles a missing device and the advert
callback triggers a refresh.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tim merged commit a33d39f160 into main 2026-10-15 10:17:04 +00:00
tim deleted branch fix/no-setup-backoff 2026-10-15 10:17:04 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
tim/hass-nissan-leaf-obd-ble!7
No description provided.