I have an automation that gets a podcast url from a sensor and streams it. It was working fine up until recently until i noticed it starting send a blank url to the media device. I noticed in developers tools template editor it works fine when formatted like in first example below but when the automation is saved its dropping the "Friend')['url'] }}}" part onto new line. When i try the second example in the developer tools template editor it doesnt retrieve the url. Anyone know why this is happening/a way to keep the format like the first example in the automation? Thanks
media:
media_content_id: >-
{{ state_attr('sensor.latest_podcasts_url', 'Conan O’Brien Needs A Friend')['url'] }}}
media_content_type: music
metadata: {}
media_content_id: >-
{{ state_attr('sensor.latest_podcasts_url', 'Conan O’Brien Needs A
Friend')['url'] }}}
media_content_type: music
metadata: {}