How to use switch template?

How to correct use of switch template?

value_template: when kodi is playing something or is idle switch must be in on function, how?

I try like this but switch is on only when kodi is idle:

value_template: "{{ is_state('media_player.bedroom_rpi3_kodi', 'idle') or is_state('media_player.kodi_bedroom_rpi3', 'playing') }}"

Because you are using two different entity ids in your template.

1 Like

Thanks :slight_smile:

1 Like