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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yeelight disable polling #59885
Yeelight disable polling #59885
Conversation
Hey there @rytilahti, @zewelor, @shenxn, mind taking a look at this pull request as it has been labeled with an integration ( |
Any reason we can't make this much simpler and do
? |
@bdraco since polling is turned on, that would mean that the bulbs get extra update requests each scan_intervall (I don't know how many seconds). The polling is turnd on beacause I believe there were still some issues with older models that sometimes went unavailable and would not properly turn to available again (although that might have already been fixed, I don't know). |
I think we can disable polling now since the library will take care of seeing available and unavailable properly now. |
@bdraco alright, I changed it to disabling polling and setting the update to force mode. |
Thanks @starkillerOG 馃憤 |
Co-authored-by: J. Nick Koston <nick@koston.org>
Breaking change
Proposed change
Add a force update service to the yeelight integration.The regular
homeassistant.update_entity
does not work for the yeelight integration since updates are not executed as long as the device is available (polling is turned on but if the device is available the update function emidiatly returns withouth doing the update, if the device is unavailable the update is actually executed).This new force update service will actually update the device even if it is available.
Disable polling of the yeelight integration and let it be handeld by the upstream lib.
Make the async_update function force and update such that
homeassistant.update_entity
will actually get the state from the bulb.relevant lines:
core/homeassistant/components/yeelight/__init__.py
Lines 643 to 647 in 1609c0c
Type of change
Additional information
Checklist
black --fast 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
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: