Adds new integration [RockJesus/ha-jiachao] by RockJesus · Pull Request #12368 · hacs/default · GitHub
Skip to content

Adds new integration [RockJesus/ha-jiachao] - #12368

Open
RockJesus wants to merge 8 commits into
hacs:masterfrom
RockJesus:Add-RockJesus/ha-jiachao
Open

RockJesus wants to merge 8 commits into
hacs:masterfrom
RockJesus:Add-RockJesus/ha-jiachao

Conversation

@RockJesus

@RockJesus RockJesus commented Oct 21, 2026 •

Copy link
Copy Markdown

Checklist

  • I've read the publishing documentation.
  • I've added the HACS action to my repository.
  • (For integrations only) I've added the hassfest action to my repository.
  • The actions are passing without any disabled checks in my repository.
  • I've added a link to the action run on my repository below in the links section.
  • I've created a new release of the repository after the validation actions were run successfully.

Links

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

@hacs-bot hacs-bot Bot changed the title Adds new integration Adds new integration [RockJesus/ha-jiachao] Oct 21, 2026
@hacs-bot

hacs-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown

@frenck frenck left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @RockJesus, thanks for the submission! 👋

Two problems in the config flow need fixing.

  1. custom_components/jiachao/config_flow.py line 156 does return await self.async_show_form(...). async_show_form is not a coroutine, it returns the form result directly, so awaiting it raises a TypeError. This is hit whenever the account has no light device (the no_devices error path), and the flow crashes instead of showing the error. Please drop the await.

  2. Reauth and reconfigure never reload the entry. In async_step_device (lines 194-210) you call async_update_entry(...) and then async_abort(...). After a ConfigEntryAuthFailed, 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 use self.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

@RockJesus

Copy link
Copy Markdown
Author

@RockJesus
RockJesus requested a review from frenck October 25, 2026 16:40

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants