Hey.
I have two cards, I want to display the Spotify card if Spotify is playing and when it’s turned off/inactive it should display my recently added videos to plex. The code I have so far is this;
So my understanding from the below YAML is.
The state of that sensor sensor.plex_recently_added can not be PLAYING so it’s FALSE and should not display the card.
Then the next one; IF the state is PLAYING of media_player.spotify then show the card under it.
So, if the condition is TRUE then show the card, right? If so, when I deploy below code it displays the Plex card only and not the Spotify card even if it’s playing… So I reckon that it’s thinking the state is TRUE but whatever I try I can not get it to work…
- type: horizontal-stack
cards:
- type: conditional
conditions:
- entity: select.conditional_media
state_not: playing
card:
type: custom:button-card
entity: sensor.plex_recently_added
name: Net toegevoegd
tap_action:
action: none
template:
- conditional_media
- icon_plex
- type: conditional
conditions:
- entity: select.conditional_media
state: playing
card:
type: custom:button-card
entity: media_player.spotify
tap_action:
action: none
template:
- conditional_media
- icon_spotify