I’m working on some buttons for various media control, and I keep on writing stuff like this:
"{{
(
is_state('media_player.all', 'playing') or
is_state('media_player.all', 'paused')
)
and not
(
is_state('media_player.tramsosaurus', 'playing') or
is_state('media_player.tramsosaurus', 'paused')
)
}}"
I can’t use state off, since chromecasts also have the state “Idle” is there any better way to check for attributes or can you create you own functions somehow? I know a little bit of python