I’m struggling with getting the distance from the Waze integration. By using the Template tool under Developer tools, I can get access to the data that I want using
{{ state_attr("sensor.mark_to_work","duration") }}
{{ state_attr("sensor.mark_to_work","distance") }}
{{ state_attr("sensor.mark_to_work","route") }}
If however I put this into my sensors.yaml, it will only pull the Route and not the duration or distance.
- platform: template
sensors:
marktowork_dist:
value_template: '{{ state.attr("sensor.mark_to_work","distance") }}'
friendly_name: 'Mark to Work Distance'
marktowork_time:
value_template: '{{ state.attr("sensor.mark_to_work","duration") }}'
friendly_name: 'Mark to Work Time'
marktowork_route:
value_template: '{{ state_attr("sensor.mark_to_work","route") }}'
friendly_name: 'Mark to Work Route'
What am i doing wrong? I’m starting to go round the bend!