Error rendering data template: UndefinedError: ‘mappingproxy object’ has no attribute ‘duration_in_traffic’
This error I get while I did not touch the core settings of the sensors. The part in the configuration.yaml file is:
- platform: google_travel_time
name: ‘naam tot thuis’
api_key: !secret google_api_key
origin: device_tracker.iphone_van_naam
destination: zone.home
Automation:
The part of the action is:
action:
- service: notify.ios_iphone_van_naam
data_template:
message: "Naam vertrekt van de AH, ze zou thuis moeten zijn in {% set travel_time = states.sensor.naam_tot_thuis.attributes.duration_in_traffic.split(' ') %} {{ travel_time[0] | int + 1 }} tot {{ travel_time[0] | int + 3 }} {{ travel_time[1] }}."
Sorry my knowledge is way too short to understand what misses but I do get the Error which I posted on the top of this topic.
According to this page
there is no duration_in_traffic. The error message is accurate.
Thank you, but can you point me in a direction what it should be? In data_template format…
Again the odd thing is, it worked until this afternoon, no problem, even after several reboots of HA
Anyway hope someone can help me to correct this.
Errors that were ignored in older versions of HA are no longer ignored.
Look at the web page link I posted & figure out a different way of stating your goal using only the available parameters.
Ok, the website I read, tweaked a setting to remove the duration in traffic to something else but no luck.
So I don’t know how to figure out so I can get an estimated time frame from A to Home.
Thanks for replying, perhaps someone else can point me in a direction of examples how to set this correct.
Entering starting point, destination and mode of travel does not give you the travel time?
I think Waze has travel time integration too.