skip_configuration() also skips attribute initialization
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- backend, embedded-iot
Research direction
Read async_configure() and async_initialize() in zha/zigbee/device.py to see how the shared skip_configuration flag controls reporting setup and initial attribute reads. Then trace QuirkBuilder’s skip_configuration() implementation and documentation. Decide whether to split the behavior as suggested or clarify the existing behavior; done means the API and docs consistently describe when startup attribute reads occur.
Written by the indexing model from the issue text.
Description
I noticed .skip_configuration() does more than its documentation suggests.
In the zha-device-handlers repository, copilot-instructions.md describes it as:
.skip_configuration()- Skip attribute reporting configuration
The method's docstring also only mentions skipping reporting configuration.
However, in ZHA's device.py, the same skip_configuration flag is checked in both async_configure() and async_initialize().
As a result, enabling .skip_configuration() also skips the initial attribute reads for entities defined in QuirkBuilder.
This also affects the Refresh mains-powered devices state on startup option. Even when enabled, attribute initialization is skipped for these devices.
Suggestion
Would it make sense to separate these two operations?
For example:
.skip_configuration()— skip binding and reporting configuration..skip_initialization()— skip initial attribute reads.
This would allow devices that don't support standard reporting configuration to still have their attributes read during initialization and startup refresh.
If the current behavior is intentional, perhaps the QuirkBuilder documentation and method docstring should at least be updated to clarify that .skip_configuration() also disables attribute initialization.
- Dominant language
- Python
- Stars
- 96
- Forks
- 84
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 30
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from zigpy/zha
-
Device override creates the generic entity instead of the vendor-specific one (Light instead of HueLight, ForceOnLight, MinTransitionLight)Possibly taken @zigpy-review-bot claimed this today. Openbot: code audit
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Each time a device becomes available again, ZHA adds another firmware update listener that is never releasedPossibly taken @zigpy-review-bot claimed this 1 day ago. Openbot: code audit
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Devices that left the network are re-initialized on every availability check, reading attributes from a device that is gonePossibly taken @zigpy-review-bot claimed this 1 day ago. Openbot: code audit
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
device specific quirks
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pimutils/vdirsyncer#1242 ·
-
priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
QuantConnect/lean-cli#792 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
open-webui/open-webui#35360 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Suggest link: Destiny Verify (MIT zero-dependency pre-commit security, citation & link hygiene CLI)Open
Difficulty 1/5 Under an hour Newbie friendliness 68/100