agittins / agittins/bermuda

Add service for instantaneous calculation of device Area

Abierto
#243 0 comentarios 0 reacciones 1 asignado Reclamado por @agittins Ver en GitHub
enhancement
Lenguaje dominante
Python
Estrellas
2k
Forks
70
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.