Skip to content
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

Fix listed beacons that are out of range after enable #3398

Merged
merged 2 commits into from
Mar 10, 2023
Merged

Fix listed beacons that are out of range after enable #3398

merged 2 commits into from
Mar 10, 2023

Conversation

Adi146
Copy link
Contributor

@Adi146 Adi146 commented Mar 5, 2023

Summary

This MR fixes a bug, where the beacon monitor lists iBeacons that are out of range after enabling.
#3010

Screenshots

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

@jpelgrom
Copy link
Member

jpelgrom commented Mar 7, 2023

How does this fix the issue the previous PR to fix this encountered, where the live data is caching/sending old values?

@Adi146
Copy link
Contributor Author

Adi146 commented Mar 7, 2023

The Beacon Library finishes the current scan when we stop it and as we unbind the observer on stop we can use the check if any observer is bound. Otherwise we would empty the list and add the beacon which was found on the last scan to the empty list again. That's why the previous PR didn't work.

Copy link
Member

@dshokouhi dshokouhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me and we have a user who has verified the fix for us. Thanks for the fix! 🙏

@leroyloren
Copy link

Yes, this is the only thing missing to make the Beacon Monitor work flawlessly ;-)

@JBassett JBassett merged commit 3ebae7e into home-assistant:master Mar 10, 2023
@JBassett JBassett linked an issue Mar 10, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Beacon monitor remembers values from when it was disabled
5 participants