Is there a way to check in value_template if the switch you are working on is currently on?
My case is a chromecast, I want a toggle for when I’m playing a random song from a list, currently i use this:
value_template: "{{ is_state('media_player.hela_huset', 'playing') }}"
It works fairly well, but when I start casting anything else (from spotify on my andorid for example, the toggle turns on. I can’t easily check what media is currently playing so the best would be to some how keep track of the toggler I think, but if I add
value_template: "{{ is_state('media_player.hela_huset', 'playing') and is_state('switch.lonman', 'on' }}",
the toggler just turns off.