I’ve been trying to create a script (which will be triggered by Alexa), that will either pause one device or the other, depending on which is currently playing. I cannot figure out how it should be written, though.
I think it should be something along these lines, but I think I need help with the formatting, or instructions: (I’ve tried a few ways, and this particular one gives me “template rendered invalid service” error)
alias: '123'
sequence:
service_template: >
{% if is_state('media_player.fire_stick_lounge', 'playing') %}
script.pause_resume_fire_stick
{% elif is_state('media_player.roku_lounge', 'playing') %}
script.pause_roku
{% endif %}
mode: single