Updating the Google Travel Time sensor manually?

Hi,
Is there any way of updating the Google Travel Time sensor manually? I have adjusted the automatic update in the sensor to update every six hours not to exceed the free threshold. Now I am trying to find a way of updating the sensor manually on demand, or with automation. Linking to the Google Travel Time sensor to the ‘homeassistant.update_entity’ doesn’t seem to work. Does anyone have an idea how to achieve this?

homeassistant.update_entity should work, I use it.

Thanks, any idea how to get it to work with a Google Travel Time sensor to trigger manual updates?

At the most simplistic, you have an automation that’s triggered when the device tracker updates:

alias: 'person1 on the move'
trigger:
  - platform: state
    entity_id: device_tracker.person1_mobile
condition:
  - condition: template
    value_template "{{ not is_state('device_tracker.person1_mobile','home') }}"
action:
  - service: homeassistant.update_entity
    entity_id: sensor.person1s_time_to_home

That is massively simplified from how I do it. I use a separate script, and a proximity sensor, so that the frequency of updates is linked to the distance from home. The further away I am, the less it updates.

1 Like

I’ve tried using the homeassistant.update_entity as well but it doesn’t seem to be working. The automation runs as I also set a notification, but the travel time on my dashboard only seems to be updatet every 8 minutes or so.
I also tried setting the scan_interval in my sensors.yaml to 60 seconds for testing but that also doesn’t seem to work.

Any ideas?
Thanks!


EDIT: When keeping an eye on the API request amount I only see it increase 1 every 5-8 minutes or so. Manually calling homeassistant.update_entity > sensor.luck_travel_home_time will not increase the API request amount.

Hi - that sounds very interesting to me - would you share some details?
what did you set in the sensor as scan_interval?
I’ve set mine to 6000 currently to update not more than every 10 hours (when I’m at home)

Thanks
Albert

Everything of mine is on my GitHub. This comes together with an automation and a script. The script in this case updates different travel sensors (car, bus, foot, and waze).

1 Like