Google Travel Time adjustable polling

As part of the launch of the Google Maps Platform the free tier pricing plans have changed.
This effectively means the number of free requests per day reduces from 2500 by about half to around 1300 (measured as up to 40,000 per month).

This means you can now only get away with 4 travel time sensors rather than up to 8, assuming you are not making any other calls to the platform.

My suggestion is to add configuration variables for:

  • poll interval (allowing to select how many mins between polls to the platform - currently hardcoded to 5mins)
  • activity window (set time/days where the polling is active eg: polling only between 6am and 10pm, or only poll work travel times on week days)

These changes should allow for good control of the polling and allow lots more sensors to be added and fit within the free tier.

You can use something like
scan_interval: 86400
on any sensor right?

+1
Especially not polling during the night is very valueable, IMO.

+1
Defining a time-range window would be very useful like pbavinck suggested.

+1 on the time window

+1 on the time window

Better yet is to extend the travel time sensor to allow multiple origins and destinations to be specified. If you look at the actual API and pricing they clearly state up to 25 origins and 25 destination are considered a SINGLE API request.

So if HA exposed this fully; and not a call per origin/destination pair; we’d all be happy… as we can make a single API call every 5 minutes without breaking out of the free tier.

I can confirm the scan interval can be changed and I set polling to 10mins with:

scan_interval: 600