Skip to content

Document the account-login backend, and pin the options reload to the framework - #175

Open
OdynBrouwer wants to merge 2 commits into
cdpuk:mainfrom
OdynBrouwer:docs/v2-account-login
Open

OdynBrouwer wants to merge 2 commits into
cdpuk:mainfrom
OdynBrouwer:docs/v2-account-login

Conversation

@OdynBrouwer

Copy link
Copy Markdown

Two things that came out of #168 and the #135 thread, one commit each.

README - the configuration section now describes all three backends in the config flow instead of the two that existed when it was written. The gap mattered: an owner whose Bestway Connect app was updated after July 2026 gets a share link rather than a RW_Share_ code, so the V2 QR option cannot accept it, and the README had nothing pointing at the account-login option that does work for them. The same paragraph also asked for a QR code from the Lay-Z-Spa app settings, contradicting the paragraph above it, which says that app does not provide one.

Test - test_options_change_keeps_the_entry_loaded pins the options-reload path. An options change reaches async_setup_entry through the entry's update listener; when that path sets the entry up directly the framework's state stays LOADED, and the coordinator's first refresh raises ConfigEntryError. Two users reported the result in #135 (option change, spa unavailable, delete and re-add to recover). async_reload_entry has delegated to hass.config_entries.async_reload since #142, so the failure is gone; the test is there so the direct call cannot come back. Driving hass.config_entries.async_reload from a test instead would pass either way, which is why this one updates an option.

Verified by reverting async_reload_entry to its direct-call body: the new test then fails with the reported traceback shape exactly (async_reload_entry -> async_setup_entry -> _async_setup_gizwits -> async_config_entry_first_refresh -> ConfigEntryError, state LOADED). Reverted again before committing.

Tests

The full suite and the complete pre-commit gate, both run locally on this branch before pushing.

The configuration section described two ways in - V1 credentials and a V2
sharing QR code - while the config flow has offered three backends since
1.11.0. An owner whose Bestway Connect app was updated after July 2026 gets a
share link instead of a QR code, so the AWS IoT option cannot accept it, and
nothing in the README pointed at the account-login option that does.

Also fixes the V2 paragraph asking for a QR code from the Lay-Z-Spa app
settings, which the paragraph above it says does not provide one.
An options change reaches async_setup_entry through the entry's update
listener. When that path calls setup directly the framework's entry state is
untouched, so the coordinator's first refresh raises ConfigEntryError with the
state at LOADED rather than SETUP_IN_PROGRESS, and the entry stays down until
it is deleted and re-added.

The listener is the only part of the reload a test has to reach: driving
hass.config_entries.async_reload goes through the framework and would pass
either way, which is why this exercises an options update instead.
@OdynBrouwer
OdynBrouwer marked this pull request as draft September 16, 2026 17:03
@OdynBrouwer
OdynBrouwer marked this pull request as ready for review September 16, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant