Telegram - Location from attribute

I would like to send a location from HomeAssistant automations that is included in a sensor attribute. However, this is not possible in the following way. Does anyone have this working? And can he share his configuration?

If I remove the bit from data: location it will be sent. And not otherwise.
Looks like I’m not allowed to send template value as location.

service: notify.telegram
data:
  title: Goedkoopste Benzine
  message: >-
    De beste benzine is nu  € {{ states('sensor.gas_station_euro95_lowest_price_1') }} op deze locatie:
    {{    
    state_attr("sensor.gas_station_euro95_lowest_price_1","station_street") }}.
  data:  
    location:
      latitude: {{ state_attr("sensor.gas_station_euro95_lowest_price_1", "latitude") }}
      longitude: {{ state_attr("sensor.gas_station_euro95_lowest_price_1", "longitude") }}
 
 

Your problem is that you’ve put the templates inline, and not quoted them.

Either use

    location:
      latitude: '{{ state_attr("sensor.gas_station_euro95_lowest_price_1", "latitude") }}'
      longitude: '{{ state_attr("sensor.gas_station_euro95_lowest_price_1", "longitude") }}'

or use

    location:
      latitude: >-
        {{ state_attr("sensor.gas_station_euro95_lowest_price_1", "latitude") }}
      longitude: >-
        {{ state_attr("sensor.gas_station_euro95_lowest_price_1", "longitude") }}

You will have been getting errors about this in the log file, if you’d looked there.

for IOS i have the next solution :wink:

service: notify.mobile_app_iphone_van_lars
data:
  title: Goedkoopste Benzine
  message: >-
    De beste benzine is nu  € {{ states('sensor.gas_station_euro95_lowest_price_1') }} op deze locatie:
    {{    
    state_attr("sensor.gas_station_euro95_lowest_price_1","station_street") }}.
  data:
    action_data:
      latitude: '{{ state_attr("sensor.gas_station_euro95_lowest_price_1", "latitude") }}'
      longitude: '{{ state_attr("sensor.gas_station_euro95_lowest_price_1", "longitude") }}'

and do you know how to open a ios app like maps true the notification?

No idea I’m afraid, I don’t use any Apple stuff, but the companion docs may have the answer.