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

Add service for instantaneous calculation of device Area #243

Open
agittins opened this issue Jul 16, 2024 · 0 comments
Open

Add service for instantaneous calculation of device Area #243

agittins opened this issue Jul 16, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@agittins
Copy link
Owner

Currently Bermuda updates all area sensors during it's scheduled 1 second updates.

For the specific case of a "travelling button" where a user presses a bluetooth button and an automation does different actions depending on what area the button is in, the automation would be using Bermuda's calculations based on the previous advertisement, not the advertisement that caused the button press event.

This means the area sensor could be up to 1 second out of date.

This is unlikely to be a problem most of the time, since a properly configured button should be sending periodic adverts anyway, but a fast-moving button with a longish update interval could easily be less responsive than desired.

Suggestion

A new service, named something like bermuda.refresh_device_area could perform an update cycle on just the requested device, update the Area sensor and return the newly calculated Area result. This way an automation or script could call the service and know it is using Area results based on the same advertisement that triggered the script.

Care is required to ensure the change doesn't mess with the statistical validity of the data stored in Bermuda, since we make calculations based on the assumption of 1second updates.

This feature request is based on e-mail correspondence with Mike W

@agittins agittins added the enhancement New feature or request label Jul 16, 2024
@agittins agittins self-assigned this Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant