fix: raise ConfigEntryNotReady when amp is unreachable at startup#24
fix: raise ConfigEntryNotReady when amp is unreachable at startup#24steve28 wants to merge 1 commit into
Conversation
async_setup_entry let async_get_client's ValueError (device not detected, e.g. amp powered off) propagate as a raw exception, which HA treats as a hard setup failure with no auto-retry. Reload was required manually once the amp came back on. Wrap the connection/probe logic and re-raise as ConfigEntryNotReady so HA's built-in retry-with-backoff picks the entry back up on its own once the device responds again. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
This response largely written by Claude but offer some decent detail. Thanks for digging into this, @steve28, I appreciate you taking the time to submit a fix. This issue is hopefully now fixed as of One thing your PR got right that the shipped fix doesn't yet cover: wrapping the post-connect source/zone-name queries too, so a device that connects fine but drops mid-setup also retries gracefully. I've opened #25 to track that as a scoped follow-up. Thanks again for the report and the fix! Closing this in favor of v0.0.36, but your PR helped confirm the right shape for the solution. |
async_setup_entry let async_get_client's ValueError (device not detected, e.g. amp powered off) propagate as a raw exception, which HA treats as a hard setup failure with no auto-retry. Reload was required manually once the amp came back on.
Wrap the connection/probe logic and re-raise as ConfigEntryNotReady so HA's built-in retry-with-backoff picks the entry back up on its own once the device responds again.
fixes #23