You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
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.
Move native payload normalization into ha-xthings-cloud
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.
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.
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>
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>
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.
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>
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.
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>
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.
Test reloading loaded entries after native MQTT option changes
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.
Test A19-C1 HS fallback conversion with native MQTT disabled
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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Caveats
Before merge
ha-xthings-cloud(1.0.6.dev11is unpublished, so CI cannot install it).Validation
Type of change
Additional information
Protocol and validation notes
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests:
Written by Codex and Claude