Could someone please tell me what is wrong with this automation action?
- service: media_player.play_media
data template:
entity_id: media_player.entrance
media_content_id: >
{% if is_state('input_boolean.recycling_night', 'on') %}
https://mydomain.duckdns.org/local/sounds/RecyclingNight.mp3
{% else %}
https://mydomain.duckdns.org/local/sounds/GarbageNight.mp3
{% endif %}
media_content_type: 'audio/mp3'
It is throwing the following error:
Invalid config for [automation]: [data template] is an invalid option for [automation]. Check: automation->action->1->data template.