-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
Add quality scale for WLED #155482
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?
Add quality scale for WLED #155482
Conversation
|
Hey there @frenck, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
| "init": { | ||
| "data": { | ||
| "keep_master_light": "Add 'Main' control even with single LED segment" | ||
| }, |
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.
For unknown reason, pytest started reporting the error:
FAILED tests/components/wled/test_config_flow.py::test_options_flow - Failed: Translation not found for wled: `options.step.init.data_description.keep_master_light`. Please add to homeassistant/components/wled/strings.json
data_description should be optional fields, but it is not always true.
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.
They are not optional... just because it works without doesn't make them optional and it is a check that get introduced as part of the quality scale checks
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.
I relied on the documentation which says it is optional.

https://developers.home-assistant.io/docs/data_entry_flow_index/#labels--descriptions
Since this is the entrypoint for users to start using an integration, we should make sure that the config flow is very user-friendly and understandable.
This means we should use the right selectors at the right place, validate the input where needed, and usedata_descriptionin thestrings.jsonto give context about the input field.
I found another text that describes this, and it also doesn't say it's required explicitly. This could be interpreted as meaning that config flow should be user-friendly, and one way to do this is by using data_description.
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.
I created a PR: #155572
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.
Thank you also very much for explaining where this error message comes from.
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 pull request implements the parallel-updates Silver tier quality scale requirement for the WLED integration. The changes add the PARALLEL_UPDATES constant to platform files that were missing it, bringing the integration into compliance with Silver tier quality scale rules.
- Adds
PARALLEL_UPDATES = 0tobutton.py,sensor.py, andupdate.pyplatforms - Creates
quality_scale.yamltracking file documenting the integration's quality scale compliance status - Removes WLED from the exemption list in the quality scale validation script
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| script/hassfest/quality_scale.py | Removes WLED from the parallel-updates rule exemption list |
| homeassistant/components/wled/quality_scale.yaml | Adds comprehensive quality scale tracking file with rule status for Bronze, Silver, Gold, and Platinum tiers |
| homeassistant/components/wled/button.py | Adds PARALLEL_UPDATES = 0 constant with explanatory comment |
| homeassistant/components/wled/sensor.py | Adds PARALLEL_UPDATES = 0 constant with explanatory comment |
| homeassistant/components/wled/update.py | Adds PARALLEL_UPDATES = 0 constant with explanatory comment |
| # Coordinator is used to centralize the data updates | ||
| PARALLEL_UPDATES = 0 |
Copilot
AI
Oct 30, 2025
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.
The comment "Coordinator is used to centralize the data updates" doesn't explain why PARALLEL_UPDATES = 0 was chosen. According to the coding guidelines, PARALLEL_UPDATES = 0 means unlimited concurrent updates and is appropriate for coordinator-based platforms. Consider clarifying this in the comment, such as: "# Coordinator-based platform, unlimited parallel updates (PARALLEL_UPDATES = 0)"
| # Coordinator is used to centralize the data updates | ||
| PARALLEL_UPDATES = 0 |
Copilot
AI
Oct 30, 2025
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.
The comment "Coordinator is used to centralize the data updates" doesn't explain why PARALLEL_UPDATES = 0 was chosen. According to the coding guidelines, PARALLEL_UPDATES = 0 means unlimited concurrent updates and is appropriate for coordinator-based platforms. Consider clarifying this in the comment, such as: "# Coordinator-based platform, unlimited parallel updates (PARALLEL_UPDATES = 0)"
| # Coordinator is used to centralize the data updates | ||
| PARALLEL_UPDATES = 0 |
Copilot
AI
Oct 30, 2025
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.
The comment "Coordinator is used to centralize the data updates" doesn't explain why PARALLEL_UPDATES = 0 was chosen. According to the coding guidelines, PARALLEL_UPDATES = 0 means unlimited concurrent updates and is appropriate for coordinator-based platforms. Consider clarifying this in the comment, such as: "# Coordinator-based platform, unlimited parallel updates (PARALLEL_UPDATES = 0)"
| entity-translations: done | ||
| exception-translations: todo | ||
| icon-translations: done | ||
| reconfiguration-flow: todo |
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.
| comment: | | ||
| I see two problems: | ||
| - Unsupported WLED version. | ||
| - MAC address mismatch e.g. we connect to the device, but |
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.
This problem is covered by: https://github.com/home-assistant/core/pull/155491/files
| comment: This integration does not have custom service actions. | ||
| docs-high-level-description: done | ||
| docs-installation-instructions: done | ||
| docs-removal-instructions: todo |
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.
PR is ready: home-assistant/home-assistant.io#41534
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.
Merged. I bumped quality scale to bronze now.
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.
Please move all code changes to separate PRs
Keep this PR for ONLY the quality_scale.yaml + quality_scale.py changes
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
87d599d to
354b6bd
Compare
354b6bd to
ee28068
Compare
Breaking change
Proposed change
Bronze
action-setup- Service actions are registered in async_setupappropriate-polling- If it's a polling integration, set an appropriate polling intervalcore/homeassistant/components/wled/const.py
Lines 14 to 15 in 3377e90
brands- Has branding assets available for the integrationcommon-modules- Place common patterns in common moduleshttps://github.com/home-assistant/core/blob/dev/homeassistant/components/wled/entity.py
https://github.com/home-assistant/core/blob/dev/homeassistant/components/wled/helpers.py
config-flow-test-coverage- Full test coverage for the config flowconfig-flow- Integration needs to be able to be set up via the UIdata_descriptionto give context to fieldsConfigEntry.dataandConfigEntry.optionscorrectlydependency-transparency- Dependency transparencyhttps://github.com/frenck/python-wled/releases/tag/v0.21.0
docs-actions- The documentation describes the provided service actions that can be usedNo actions
docs-high-level-description- The documentation includes a high-level description of the integration brand, product, or servicedocs-installation-instructions- The documentation provides step-by-step installation instructions for the integration, including, if needed, prerequisitesdocs-removal-instructions- The documentation provides removal instructionsNot yet
entity-event-setup- Entity events are subscribed in the correct lifecycle methodsYes. We use coordinator for that.
entity-unique-id- Entities have a unique IDhas-entity-name- Entities use has_entity_name = Trueruntime-data- Use ConfigEntry.runtime_data to store runtime datahass.data[WLED_KEY]is used for coordinator that fetches information about GitHub Releases, but it is okey, as we want to avoid fetching the same data multiple times for each device.test-before-configure- Test a connection in the config flowcore/homeassistant/components/wled/config_flow.py
Lines 47 to 51 in 3377e90
test-before-setup- Check during integration initialization if we are able to set it up correctly.We use coordinator for that.
unique-config-entry- Don't allow the same device or service to be able to be set up twicecore/homeassistant/components/wled/config_flow.py
Lines 52 to 57 in 3377e90
Silver
action-exceptions- Service actions raise exceptions when encountering failuresNo actions.
config-entry-unloading- Support config entry unloadingcore/homeassistant/components/wled/__init__.py
Lines 54 to 64 in 3377e90
Should we also remove release coordinator after last entry removal?
docs-configuration-parameters- The documentation describes all integration configuration optionsdocs-installation-parameters- The documentation describes all integration installation parametersOnly one parameter HOST, but is it undocumented explciite.
entity-unavailable- Mark entity unavailable if appropriateWe use coordinator.
integration-owner- Has an integration ownerYes.
log-when-unavailable- If internet/device/service is unavailable, log once when unavailable and once when back connectedWe use coordinator.
parallel-updates- Number of parallel updates is specifiedreauthentication-flow- Reauthentication needs to be available via the UINo auth.
test-coverage- Above 95% test coverage for all integration modules98%.
Gold
devices- The integration creates devicescore/homeassistant/components/wled/entity.py
Lines 16 to 29 in 3377e90
diagnostics- Implements diagnosticshttps://github.com/home-assistant/core/blob/dev/homeassistant/components/wled/diagnostics.py
discovery-update-info- Integration uses discovery info to update network informationdiscovery- Devices can be discovereddocs-data-update- The documentation describes how data is updateddocs-examples- The documentation provides automation examples the user can use.docs-known-limitations- The documentation describes known limitations of the integration (not to be confused with bugs)docs-supported-devices- The documentation describes known supported / unsupported devicesdocs-supported-functions- The documentation describes the supported functionality, including entities, and platformsdocs-troubleshooting- The documentation provides troubleshooting informationdocs-use-cases- The documentation describes use cases to illustrate how this integration can be useddynamic-devices- Devices added after integration setup.This integration has a fixed single device.
entity-category- Entities are assigned an appropriate EntityCategoryentity-device-class- Entities use device classes where possibleentity-disabled-by-default- Integration disables less popular (or noisy) entitiesentity-translations- Entities have translated namesexception-translations- Exception messages are translatableicon-translations- Entities implement icon translationsreconfiguration-flow- Integrations should have a reconfigure flowrepair-issues- Repair issues and repair flows are used when user intervention is neededstale-devices- Stale devices are removedThis integration has a fixed single device.
Platinum
async-dependency- Dependency is asyncinject-websession- The integration dependency supports passing in a websessionstrict-typing- Strict typingType 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: