How to present all values from a sensor in frontend

The platform google_travel_time gives following answers but sensor only show duration. How to get value distance as well?

units: metric
duration_in_traffic: 14 mins
duration: 14 mins
distance: 10.4 km
unit_of_measurement: min

Create a template sensor to extract that info from the sensor’s attributes:

sensor:
  - platform: template
    sensors:
      google_travel_km:
        unit_of_measurement: 'km'
        value_template: "{{ states.sensor.your_google_sensor_name.attributes.distance}}"
1 Like

Thank you, i was in the correct direction but i had missed attributes

1 Like