Use Map Dynamic Attachments with a Device Tracker

I am trying to create an automation that if my ipad battery gets low, it sends a notification to my iphone with the ipads last known location on a map. I am using the dynamic attachment to make the map appear in the notification and i just cant figure out the proper wording of the lat and long. Here is what i have now.

service: notify.mobile_app_sams_iphone
data:
  message: iPad battery is low, last known location is
  data:
    action_data:
      latitude: {{ state_attr("device_tracker.sams_ipad", "latitude") }}
      longitude: {{ state_attr("device_tracker.sams_ipad", "longitude") }}

Try this:

service: notify.mobile_app_sams_iphone
data:
  message: iPad battery is low, last known location is
  data:
    action_data:
      latitude: "{{ state_attr('device_tracker.sams_ipad', 'latitude') }}"
      longitude: "{{ state_attr('device_tracker.sams_ipad', 'longitude') }}"