-
-
Notifications
You must be signed in to change notification settings - Fork 36.5k
Add Matter Thread Network Diagnostics cluster sensors #160400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
Hey there @home-assistant/matter, 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds three Thread Network Diagnostics cluster sensors to the Matter integration to improve troubleshooting and visibility into Thread network stability for Matter devices:
- Partition ID sensor - Reports the current Thread network partition identifier
- Attach Attempts counter - Tracks cumulative attach attempt count
- Partition ID Changes counter - Tracks how many times the partition ID has changed
All three sensors are diagnostic entities disabled by default to avoid cluttering the UI, following Home Assistant conventions for technical diagnostic data.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
homeassistant/components/matter/sensor.py |
Adds three MatterDiscoverySchema definitions for Thread Network Diagnostics sensors with appropriate state classes, entity categories, and feature map requirements |
homeassistant/components/matter/strings.json |
Adds translation keys for the three new sensor entity names |
homeassistant/components/matter/icons.json |
Assigns antenna icons (mdi:antenna) to all three Thread diagnostic sensors |
tests/components/matter/test_sensor.py |
Adds comprehensive tests for all three sensors including initial state verification, update handling, entity category validation, and None value handling |
Proposed change
ThreadNetworkDiagnosticsPartitionId: current Thread network partition IDThreadNetworkDiagnosticsAttachAttemptCount: attach attempts counterThreadNetworkDiagnosticsPartitionIdChangeCount: partition ID changes counterThe whole point is to graph them in order to see the changes and thus identify instability.
I would also like to add a Thread network connection reliability indicator on a scale of 1 to 10 in a future PR.
Details
Type of change
Additional information
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: