Add Accessory Status sensor to Lyric integration - #177064
Conversation
Resideo's priority endpoint reports a per-accessory status (e.g. "Ok") for paired room sensor accessories, which was parsed but never surfaced. Adds it as a diagnostic sensor so a failing/offline room sensor is visible instead of just its temperature/humidity readings silently going stale.
|
Hey there @timmo001, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Pull request overview
Adds a diagnostic sensor exposing Honeywell Lyric room-accessory status.
Changes:
- Adds the accessory status sensor definition.
- Adds its translated entity name.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
sensor.py |
Defines the diagnostic accessory status sensor. |
strings.json |
Adds the sensor’s display name. |
| LyricSensorAccessoryEntityDescription( | ||
| key="accessory_status", | ||
| translation_key="accessory_status", | ||
| entity_category=EntityCategory.DIAGNOSTIC, | ||
| value_fn=lambda _, accessory: accessory.status, |
| LyricSensorAccessoryEntityDescription( | ||
| key="accessory_status", | ||
| translation_key="accessory_status", | ||
| entity_category=EntityCategory.DIAGNOSTIC, | ||
| value_fn=lambda _, accessory: accessory.status, |
There was a problem hiding this comment.
Documentation added/updated for www.home-assistant.io
Link to documentation pull request: home-assistant/home-assistant.io#46986
| "accessory_status": { | ||
| "name": "Accessory status" |
| ), | ||
| LyricSensorAccessoryEntityDescription( | ||
| key="accessory_status", | ||
| translation_key="accessory_status", |
There was a problem hiding this comment.
What are the possible options? If it's a finite list, we should make this an enum device class and return the possible options so we can make a better experience
There was a problem hiding this comment.
Good question — I actually went and checked. Resideo's own API schema for this endpoint doesn't document a status field on accessories at all (only id, type, excludeTemp, excludeMotion, temperature are documented; status shows up in practice but isn't in their spec). The only value I've ever observed, across my own live capture and aiolyric's test fixtures, is "Ok" — I have no second data point.
Given that, I'd rather not enum-ify it yet: if I lock in options=["Ok"] and a sensor actually goes offline/errors (exactly the failure mode this diagnostic sensor exists to surface), HA would treat that unlisted value as invalid instead of showing it — which defeats the point. Happy to switch to SensorDeviceClass.ENUM the moment we have real evidence of the full value set, but I don't want to guess it into an incomplete enum right now.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Resideo's priority endpoint reports a per-accessory status (e.g. "Ok") for paired room sensor accessories, which was parsed but never surfaced. Adds it as a diagnostic sensor so a failing/offline room sensor is visible instead of just its temperature/humidity readings silently going stale.
Proposed change
Resideo's priority endpoint reports a per-accessory status (e.g.
"Ok") forpaired room sensor accessories, which was parsed but never surfaced. Adds it as a
diagnostic sensor so a failing/offline room sensor is visible instead of just its
temperature/humidity readings silently going stale.
Dependency note: this needs #177022 (coordinator actually fetching room data) to
populate at all, but the underlying
accessory.statusfield already reads thecorrect JSON key in the currently-released
aiolyric— no library fix required.Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
Link to documentation pull request: Lyric binary sensor and new sensors docs home-assistant.io#46986
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: