Repository navigation
Conversation
frenck
left a comment
There was a problem hiding this comment.
Hi @RockJesus, thanks for the submission! 👋
Two problems in the config flow need fixing.
-
custom_components/jiachao/config_flow.pyline 156 doesreturn await self.async_show_form(...).async_show_formis not a coroutine, it returns the form result directly, so awaiting it raises aTypeError. This is hit whenever the account has no light device (theno_deviceserror path), and the flow crashes instead of showing the error. Please drop theawait. -
Reauth and reconfigure never reload the entry. In
async_step_device(lines 194-210) you callasync_update_entry(...)and thenasync_abort(...). After aConfigEntryAuthFailed, the new token is saved but the entry is not set up again, so the integration stays in the error state until Home Assistant restarts. Please useself.async_update_reload_and_abort(entry, data=data)for both reauth and reconfigure (and set the unique id check so the right entry is matched).
Once that's addressed, push a new release and re-request review.
../Frenck
Blogging my personal ramblings at frenck.dev
Or subscribe to my free bi-weekly newsletter: frenck.dev/newsletter

Checklist
Links
Link to current release: https://github.com/RockJesus/ha-jiachao/releases/tag/v2.2.6
Link to successful HACS action (without the
ignorekey): https://github.com/RockJesus/ha-jiachao/actions/runs/40212181633/job/121225570423Link to successful hassfest action (if integration): https://github.com/RockJesus/ha-jiachao/actions/runs/40212181589/job/121225570107