home-assistant-google_fit icon indicating copy to clipboard operation
home-assistant-google_fit copied to clipboard

Update Interval?

Open think-nice-things opened this issue 3 years ago • 2 comments

How often are the sensors updated? Adjusting this to something like at least every few minutes would be helpful at least for the heart rate.

think-nice-things avatar Apr 15 '21 20:04 think-nice-things

Every 30 minutes, Google changed their API rate limits to 10000/month (we think) I don't know it this is true for all endpoints, or we need to change code with different fetch processes with their own poll rates.

cyberjunky avatar Apr 16 '21 13:04 cyberjunky

Hi I digged a litte into the code. It seems that for every sensor a dataPointChanges().list() is requested anyway. What is returned is a list of data points but google_fit just uses the latest instead of updating HA with all datapoints which are not in HA so far. So even if google is contacted every 30 minutes only, it might be able to get more datapoints for example if fit stores more datapoints than every 30 minutes only.

There are sensors which are probably not really updated frequently (like size or weight). There are sensors which maybe are updated frequently, take for example heart rate. If doing a workout, the heart rate might be updated more frequently.

It would be helpful, if google_fit integration would update HA with all datapoints of the list which are not yet in HA.

think-nice-things avatar Apr 19 '21 19:04 think-nice-things