Skip to content

Add optional confirmed MQTT controls for Xthings A19-C1 bulbs - #183027

Draft
ariofrio wants to merge 11 commits into
home-assistant:devfrom
ariofrio:ariofrio/xthings-bulb-mqtt
Draft

ariofrio wants to merge 11 commits into
home-assistant:devfrom
ariofrio:ariofrio/xthings-bulb-mqtt

Conversation

@ariofrio

@ariofrio ariofrio commented Sep 24, 2026 •

Copy link
Copy Markdown

Proposed change

Adds opt-in native cloud MQTT readback and confirmed controls for the U-tec Bright A19-C1, whose HTTP status omits color temperature. Client dependency diff: XthingsJacobs/ha-xthings-cloud#1.

Behavior

  • Option: one options-flow toggle, off by default. No certificate paths to configure.
  • State: native bulbs report their own confirmed state and availability, independent of the account poll. HTTP and WebSocket updates cannot overwrite it.
  • Recovery: while native setup fails or a bulb is unavailable, the integration retries and rediscovers routes every 10 minutes, on a timer WebSocket traffic cannot postpone. Authentication failures start reauthentication.
  • With the option off: A19-C1 bulbs get fixed capabilities and unit conversion. The HTTP path treated the bulb's 1–100 temperature setting as Kelvin. Other models are unchanged.

Caveats

  • Color/temperature commands can overwrite a very recent change made in the app.
  • Changes made in the app appear after the next native query, up to about 30 seconds.
  • If Xthings revokes the shared app certificate, native control stops until the client ships a replacement.
  • Kelvin values are a linear estimate across the advertised 2700–6500 K. Mapping investigation

Before merge

  • Publish ha-xthings-cloud (1.0.6.dev11 is unpublished, so CI cannot install it).
  • Review the bundled shared app credential.
  • Human review.

Validation

  • 64 integration tests and 21 snapshots pass on the dev branch and the 2026.9.3 backport. Changed-file hooks pass.
  • Live on HAOS 18.3 with four A19-C1 bulbs and a group: 54 scenarios passed, each checked by an independent device read.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Protocol and validation notes

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

Written by Codex and Claude

Copilot AI balanced review requested due to automatic review settings September 24, 2026 06:02

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @ariofrio

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant

Copy link
Copy Markdown
Contributor

Hey there @XthingsJacobs, mind taking a look at this pull request as it has been labeled with an integration (xthings_cloud) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of xthings_cloud can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant mark-draft Mark the pull request as draft.
  • @home-assistant ready-for-review Remove the draft status from the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign xthings_cloud Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant update-branch Update the pull request branch with the base branch.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) on the pull request.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The dependency is unpublished, authentication failures bypass reauthentication, and documentation and conversion coverage remain incomplete.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity · 2 Low severity

Open (3)
What changed in this PR

Adds opt-in native MQTT control and confirmed state handling for Xthings A19-C1 bulbs.

Changes:

  • Adds native MQTT configuration and TLS credential validation.
  • Adds native state coordination and light-value conversions.
  • Adds integration tests and updates the client dependency.
File Description
homeassistant/​components/​xthings_cloud/​__init__.py Reloads the integration when options change.
homeassistant/​components/​xthings_cloud/​config_flow.py Adds native MQTT options.
homeassistant/​components/​xthings_cloud/​coordinator.py Manages native bulb clients and confirmed state.
homeassistant/​components/​xthings_cloud/​light.py Adds A19-C1 capabilities and unit conversions.
homeassistant/​components/​xthings_cloud/​manifest.json Updates the client dependency.
homeassistant/​components/​xthings_cloud/​strings.json Adds option-flow text.
requirements_all.txt Updates the generated dependency pin.
tests/​components/​xthings_cloud/​test_config_flow.py Tests credential validation.
tests/​components/​xthings_cloud/​test_native_bulb.py Tests native state and temperature behavior.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread homeassistant/components/xthings_cloud/coordinator.py
Comment thread homeassistant/components/xthings_cloud/light.py
Comment thread homeassistant/components/xthings_cloud/strings.json Outdated
@github-actions

Copy link
Copy Markdown

Check requirements

Checked at commit 982d62c.

⚠️ Some checks require attention — see the details below.

Package Old New No Advisories Not Yanked Repo Public CI Upload Release Pipeline Security PR Link Async Safe
ha-xthings-cloud 1.0.5 1.0.6.dev1 ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌
📦 ha-xthings-cloud: 1.0.5 → 1.0.6.dev1
  • No Advisories: ❌ Version 1.0.6.dev1 not found on PyPI.
  • Not Yanked: ❌ Version 1.0.6.dev1 not found on PyPI.
  • Repo Public: ❌ Version 1.0.6.dev1 not found on PyPI.
  • CI Upload: ❌ Version 1.0.6.dev1 not found on PyPI.
  • Release Pipeline: ❌ Cannot inspect release pipeline for a version that doesn't exist.
  • Security: ❌ Version 1.0.6.dev1 not found on PyPI.
  • PR Link: ❌ Version 1.0.6.dev1 not found on PyPI.
  • Async Safe: ❌ Version 1.0.6.dev1 not found on PyPI.

Generated by Check requirements (AW) · copilot · auto · 14.3 AIC · ⌖ 6.22 AIC · ⊞ 12.2K · ◷

Copilot AI review requested due to automatic review settings September 24, 2026 06:37

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @ariofrio

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The dependency is unpublished, optional MQTT failures affect unrelated entities, and documentation and key tests remain incomplete.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 2 Low severity

Open (4)
Resolved since last review (1)
Previously missed (2)

In code that hasn't changed since last review

Low severity Test options changes reload loaded entries

homeassistant/​components/​xthings_cloud/​__init__.py:36

Add coverage that saving this option reloads a loaded entry. The options-flow test only writes options to an unloaded entry, so it does not verify that this listener activates or disables native MQTT without a manual restart.

Low severity Move native payload normalization into ha-xthings-cloud

homeassistant/​components/​xthings_cloud/​coordinator.py:37

Move raw native payload normalization into ha-xthings-cloud. Translating protocol fields such as pw, br, and ct in Core makes the integration responsible for protocol parsing; the client library should expose a normalized state contract instead.

Comment thread homeassistant/components/xthings_cloud/coordinator.py Outdated
Comment thread homeassistant/components/xthings_cloud/config_flow.py
@github-actions

Copy link
Copy Markdown

Check requirements

Checked at commit 8fd6bbe.

⚠️ Some checks require attention — see the details below.

Package Old New No Advisories Not Yanked Repo Public CI Upload Release Pipeline Security PR Link Async Safe
ha-xthings-cloud 1.0.5 1.0.6.dev2 ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌
📦 ha-xthings-cloud: 1.0.5 → 1.0.6.dev2
  • No Advisories: ❌ Version 1.0.6.dev2 not found on PyPI.
  • Not Yanked: ❌ Version 1.0.6.dev2 not found on PyPI.
  • Repo Public: ❌ Version 1.0.6.dev2 not found on PyPI.
  • CI Upload: ❌ Version 1.0.6.dev2 not found on PyPI.
  • Release Pipeline: ❌ Cannot inspect release pipeline for a version that doesn't exist.
  • Security: ❌ Version 1.0.6.dev2 not found on PyPI.
  • PR Link: ❌ Version 1.0.6.dev2 not found on PyPI.
  • Async Safe: ❌ Version 1.0.6.dev2 not found on PyPI.

Generated by Check requirements (AW) · copilot · auto · 18 AIC · ⌖ 7.6 AIC · ⊞ 13.3K · ◷

Copilot AI review requested due to automatic review settings September 24, 2026 07:02

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @ariofrio

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The dependency is unpublished, and the new option is marked documented despite documentation remaining pending.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 3 Low severity

Open (3)
Resolved since last review (2)

Comment thread homeassistant/components/xthings_cloud/quality_scale.yaml
Require ha-xthings-cloud 1.0.6.dev3 so native on/off uses the dedicated power command and discovery includes grouped A19-C1 bulbs. The version remains unpublished pending client review and release.
Copilot AI review requested due to automatic review settings September 24, 2026 08:35

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @ariofrio

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The dependency is unpublished, and automatic option-reload behavior remains untested.

Review effort: Balanced
Findings: None

Resolved since last review (3)
Previously missed (1)

In code that hasn't changed since last review

Low severity Test native MQTT updates with a loaded entry and value changes

tests/​components/​xthings_cloud/​test_config_flow.py:107

Exercise this options submission with a loaded entry and assert that it reloads only when the value changes. This test adds an unloaded entry, so the new update listener is never registered and the behavior that activates or disables native MQTT remains untested.

Require ha-xthings-cloud 1.0.6.dev6, which merges slider changes that arrive while a command is in flight and skips redundant pre-command reads. Rapid group slider bursts confirm their final value in 1.6-3.8 seconds instead of 11-13.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 24, 2026 09:33

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @ariofrio

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The integration pins an explicitly unpublished dependency that clean installations cannot resolve.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity

Open (1)

@github-actions

Copy link
Copy Markdown

Check requirements

Checked at commit 62d294f.

⚠️ Some checks require attention — see the details below.

Package Old New No Advisories Not Yanked Repo Public CI Upload Release Pipeline Security PR Link Async Safe
ha-xthings-cloud 1.0.5 1.0.6.dev6 ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌
📦 ha-xthings-cloud: 1.0.5 → 1.0.6.dev6
  • No Advisories: ❌ Version 1.0.6.dev6 not found on PyPI.
  • Not Yanked: ❌ Version 1.0.6.dev6 not found on PyPI.
  • Repo Public: ❌ Version 1.0.6.dev6 not found on PyPI.
  • CI Upload: ❌ Version 1.0.6.dev6 not found on PyPI.
  • Release Pipeline: ❌ Cannot inspect release pipeline for a version that doesn't exist.
  • Security: ❌ Version 1.0.6.dev6 not found on PyPI.
  • PR Link: ❌ Version 1.0.6.dev6 not found on PyPI.
  • Async Safe: ❌ Version 1.0.6.dev6 not found on PyPI.

Generated by Check requirements (AW) · copilot · auto · 17.9 AIC · ⌖ 9.8 AIC · ⊞ 13.3K · ◷

Require ha-xthings-cloud 1.0.6.dev7. It keeps bulbs available through
isolated lost replies, retries failed health polls promptly, and fills
color/temperature commands from the last confirmed state instead of
reading first. Rapid group slider bursts confirmed in 1.1-3.1 seconds
across three live runs, down from 11-13 seconds.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 24, 2026 10:20

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @ariofrio

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The dependency is unpublished, shared credential review remains pending, and native client startup failures are not isolated or retried safely.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Handle native client startup failures and allow retries

homeassistant/​components/​xthings_cloud/​coordinator.py:166

Isolate and clean up native client startup failures here. If any async_start() call raises, the exception escapes the optional setup path and the clients inserted into native_bulbs are treated as started on later refreshes, so a transient MQTT connection failure can fail setup or prevent retries.

@github-actions

Copy link
Copy Markdown

Checked at commit d5873ca.

⚠️ Some checks require attention — see the details below.

Package Old New No Advisories Not Yanked Repo Public CI Upload Release Pipeline Security PR Link Async Safe
ha-xthings-cloud 1.0.5 1.0.6.dev7 ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌
📦 ha-xthings-cloud: 1.0.5 → 1.0.6.dev7
  • No Advisories: ❌ Version 1.0.6.dev7 not found on PyPI.
  • Not Yanked: ❌ Version 1.0.6.dev7 not found on PyPI.
  • Repo Public: ❌ Version 1.0.6.dev7 not found on PyPI.
  • CI Upload: ❌ Version 1.0.6.dev7 not found on PyPI.
  • Release Pipeline: ❌ Cannot inspect release pipeline for a version that doesn't exist.
  • Security: ❌ Version 1.0.6.dev7 not found on PyPI.
  • PR Link: ❌ Version 1.0.6.dev7 not found on PyPI.
  • Async Safe: ❌ Version 1.0.6.dev7 not found on PyPI.

Generated by Check requirements (AW) · copilot · auto · 16.2 AIC · ⌖ 8.99 AIC · ⊞ 13.3K · ◷

Require ha-xthings-cloud 1.0.6.dev9. The A19-C1 drops replies to queries sent right after a command; the client now sends one backup query after 1 second instead of waiting out the 5-second timeout. Rapid group slider bursts confirm in 0.8-1.8 seconds through HA.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 24, 2026 10:45

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @ariofrio

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The dependency is unpublished, and native client startup failures are not isolated or retryable.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Handle native client startup failures independently and retry failed clients

homeassistant/​components/​xthings_cloud/​coordinator.py:166

Isolate failures from each native client startup. asyncio.gather lets any exception from async_start() escape without being converted to UpdateFailed; the optional MQTT path can then fail the coordinator refresh, and the failed client remains in native_bulbs, so later refreshes consider it started and never retry it. Collect per-client results, stop/remove failed clients, and continue loading the account's other devices.

@github-actions

Copy link
Copy Markdown

Check requirements

Checked at commit 81c608d.

⚠️ Some checks require attention — see the details below.

Package Old New No Advisories Not Yanked Repo Public CI Upload Release Pipeline Security PR Link Async Safe
ha-xthings-cloud 1.0.5 1.0.6.dev9 ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌
📦 ha-xthings-cloud: 1.0.5 → 1.0.6.dev9
  • No Advisories: ❌ Version 1.0.6.dev9 not found on PyPI.
  • Not Yanked: ❌ Version 1.0.6.dev9 not found on PyPI.
  • Repo Public: ❌ Version 1.0.6.dev9 not found on PyPI.
  • CI Upload: ❌ Version 1.0.6.dev9 not found on PyPI.
  • Release Pipeline: ❌ Cannot inspect release pipeline for a version that doesn't exist.
  • Security: ❌ Version 1.0.6.dev9 not found on PyPI.
  • PR Link: ❌ Version 1.0.6.dev9 not found on PyPI.
  • Async Safe: ❌ Version 1.0.6.dev9 not found on PyPI.

Generated by Check requirements (AW) · copilot · auto · 15.4 AIC · ⌖ 8.88 AIC · ⊞ 12.2K · ◷

Require ha-xthings-cloud 1.0.6.dev10. When a slider is released again while the previous command is confirming, the client no longer reports the superseded confirmation, so the slider does not jump back to the old value.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 24, 2026 11:11

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @ariofrio

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The dependency is unpublished, shared TLS credential review remains pending, and native startup failure handling is incomplete.

Review effort: Balanced
Findings: 2 High severity

Open (2)
Previously missed (4)

In code that hasn't changed since last review

Medium severity Clean up clients when native startup fails

homeassistant/​components/​xthings_cloud/​coordinator.py:166

Handle native-client startup failures as optional setup failures. An exception from any async_start() currently escapes gather(), aborts the coordinator refresh, and leaves the newly inserted clients in native_bulbs, preventing a later retry because they are no longer considered missing; clean up failed starts and translate recoverable failures to UpdateFailed.

Low severity Test reloading loaded entries after native MQTT option changes

homeassistant/​components/​xthings_cloud/​__init__.py:26

Add a test that changes this option on an already loaded entry and verifies the entry reloads. The current options-flow test configures an unloaded entry, so it never exercises this listener that is required to activate or deactivate native MQTT.

Low severity Test A19-C1 HS fallback conversion with native MQTT disabled

homeassistant/​components/​xthings_cloud/​light.py:194

Add coverage for A19-C1 HS commands when native MQTT is disabled. The existing color-conversion test enables native MQTT and returns at line 178, so this default HTTP fallback conversion is not exercised.

Low severity Capitalize product name as “Xthings Cloud”

homeassistant/​components/​xthings_cloud/​strings.json:48

Capitalize the product name as “Xthings Cloud.” This keeps the new option text consistent with the integration name used elsewhere.

"loggers": ["ha_xthings_cloud"],
"quality_scale": "bronze",
"requirements": ["ha-xthings-cloud==1.0.5"]
"requirements": ["ha-xthings-cloud==1.0.6.dev10"]
@github-actions

Copy link
Copy Markdown

Check requirements

Checked at commit e277c82.

⚠️ Some checks require attention — see the details below.

Package Old New No Advisories Not Yanked Repo Public CI Upload Release Pipeline Security PR Link Async Safe
ha-xthings-cloud 1.0.5 1.0.6.dev10 ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌
📦 ha-xthings-cloud: 1.0.5 → 1.0.6.dev10
  • No Advisories: ❌ Version 1.0.6.dev10 not found on PyPI.
  • Not Yanked: ❌ Version 1.0.6.dev10 not found on PyPI.
  • Repo Public: ❌ Version 1.0.6.dev10 not found on PyPI.
  • CI Upload: ❌ Version 1.0.6.dev10 not found on PyPI.
  • Release Pipeline: ❌ Cannot inspect release pipeline for a version that doesn't exist.
  • Security: ❌ Version 1.0.6.dev10 not found on PyPI.
  • PR Link: ❌ Version 1.0.6.dev10 not found on PyPI.
  • Async Safe: ❌ Version 1.0.6.dev10 not found on PyPI.

Generated by Check requirements (AW) · copilot · auto · 18.2 AIC · ⌖ 8.25 AIC · ⊞ 13.3K · ◷

Address findings from an independent review:

- Unloading while native route discovery was in flight let discovery
  create and start clients afterwards. Stop native preparation once
  shutdown begins.
- A failed HTTP account poll made native bulbs unavailable until the
  next successful poll, although they confirm their own state. Native
  bulbs now take availability from their own confirmed state.
- Clients were created once and never rediscovered, so a bulb moved into
  or between Xthings groups kept its obsolete response route. Rediscover
  routes for unavailable bulbs and replace clients whose route changed.
- Native setup retries waited for the account poll, which WebSocket
  updates from other devices keep postponing. Retry on a separate
  10-minute timer while native setup failed or a bulb is unavailable.

Also test that toggling the option reloads the entry and token updates
do not. Require ha-xthings-cloud 1.0.6.dev11 for the client's shutdown,
disconnect, timeout, and input fixes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 24, 2026 12:23

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @ariofrio

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The dependency is unpublished, and the default HTTP HS conversion lacks direct test coverage.

Review effort: Balanced
Findings: 2 High severity

Open (2)

@github-actions

Copy link
Copy Markdown

Check requirements

Checked at commit 5c85408.

⚠️ Some checks require attention — see the details below.

Package Old New No Advisories Not Yanked Repo Public CI Upload Release Pipeline Security PR Link Async Safe
ha-xthings-cloud 1.0.5 1.0.6.dev11 ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌
📦 ha-xthings-cloud: 1.0.5 → 1.0.6.dev11
  • No Advisories: ❌ Version 1.0.6.dev11 not found on PyPI.
  • Not Yanked: ❌ Version 1.0.6.dev11 not found on PyPI.
  • Repo Public: ❌ Version 1.0.6.dev11 not found on PyPI.
  • CI Upload: ❌ Version 1.0.6.dev11 not found on PyPI.
  • Release Pipeline: ❌ Cannot inspect release pipeline for a version that doesn't exist.
  • Security: ❌ Version 1.0.6.dev11 not found on PyPI.
  • PR Link: ❌ Version 1.0.6.dev11 not found on PyPI.
  • Async Safe: ❌ Version 1.0.6.dev11 not found on PyPI.

Generated by Check requirements (AW) · copilot · auto · 14.7 AIC · ⌖ 8.34 AIC · ⊞ 12.2K · ◷

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