Still_image_url and google static map

Hi,

google static maps now requires an api key. Is it possible to store the api key in secrets.yaml and access it when using still_url_image?

eg, something like,

 - platform: generic
   name: "ISS location"
   still_image_url: https://maps.googleapis.com/maps/api/staticmap?key={{ APIKEY FROM SECRETS.yaml }}&center={{ states.binary_sensor.iss.attributes.lat }},{{ states.binary_sensor.iss.attributes.long }}

Cheers,

John

instead of the api_key put the whole still image url in secret

That worked. Thank you.

Thanks! I had the same question, and was glad to find it already answered here!