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
Retry yeelight setup later if the wrong device is found #98884
Conversation
If the DHCP reservation changed and there is now a different yeelight device at the saved IP address, retry setup later to avoid cross linking devices Note: this will not fix existing cross linked devices. It will only prevent the problem from happening again. Existing config entries with the issue will have to be removed manually and set up again. This is a more general problem.. see: - #98783 - #98787 - #98807
Hey there @zewelor, @shenxn, @starkillerOG, @alexyao2015, 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.
Seems good to me, but I have one question:
Why is the unique ID set with a or statement in the device?
self._unique_id = entry.unique_id or entry.entry_id |
If it is set as the entry_id will this not cause problems?
If its unset we don't validate it so it will not be able to check if its the wrong device in That should only happen in the case where multicast is broken, but there isn't anything we can do about this problem as its a network issue. |
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.
Thanks, @bdraco 👍
../Frenck
thanks |
Proposed change
If the DHCP reservation changed and there is now a different yeelight device at the saved IP address, retry setup later to avoid cross linking devices
Note: this will not fix existing cross linked devices. It will only prevent the problem from happening again. Existing config entries with the issue will have to be removed manually and set up again.
This is a more general problem.. see:
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
.To help with the load of incoming pull requests: