Hi, quick logical operator question. I want to trigger a service IF the state attribute of an entity is either value A or B (but not C, D, E, …)
How can I write that logically correct?
{% if or(is_state_attr('media_player.spotify', 'source', 'kitchen'),
is_state_attr('media_player.spotify', 'source', 'bedroom'))%}
Music at home
{% else %}
NO music at home
{%- endif %}
{% if is_state_attr('media_player.spotify', 'source', 'kitchen') or is_state_attr('media_player.spotify', 'source', 'bedroom') %}
Music at home
{% else %}
NO music at home
{%- endif %}