-
-
Notifications
You must be signed in to change notification settings - Fork 35.7k
Set PARALLEL_UPDATES for WLED #155573
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?
Set PARALLEL_UPDATES for WLED #155573
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
|
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 PARALLEL_UPDATES = 0 to three WLED platform files (button, sensor, and update) to ensure unlimited parallel updates for coordinator-based entities. The change aligns these platforms with the existing pattern already established in other WLED platforms (light, switch, number, select).
Key Changes
- Added
PARALLEL_UPDATES = 0constant to button.py, sensor.py, and update.py - Included explanatory comments indicating coordinator-based updates
- Ensures consistency across all WLED platform files
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| homeassistant/components/wled/button.py | Added PARALLEL_UPDATES = 0 with comment for coordinator-based entity |
| homeassistant/components/wled/sensor.py | Added PARALLEL_UPDATES = 0 with comment for coordinator-based entities |
| homeassistant/components/wled/update.py | Added PARALLEL_UPDATES = 0 with comment for coordinator-based entity |
| # Coordinator is used to centralize the data updates | ||
| PARALLEL_UPDATES = 0 |
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 is actually not quite true. The coordinator only parallelizes the incoming data updates. Outgoing, like pressing the buttons, are not parallelized. So is the API able to handle potentially parallell requests?
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.
Good point. We have only one button - Reset and I think there should be no parallelism here.
Changed PARALLEL_UPDATES from 0 to 1 to allow concurrent data updates.
Breaking change
Proposed change
This PR adds the PARALLEL_UPDATES = 0 constant to the WLED platform to specify unlimited concurrent entity updates, which is appropriate for coordinator-based integrations.
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: