Conditional card not behaving properly

so issue with spotify and condition card driving me nuts, see this works fine and only shows the media player playing when you start playing a track

type: vertical-stack
cards:
  - type: conditional
    conditions:
      - entity: media_player.echo_1
        state: standby
      - entity: media_player.echo_dot_clock
        state: standby
      - entity: media_player.downstairs
        state: standby
      - entity: media_player.everywhere
        state: standby
    card:
      type: calendar
      entities:
        - calendar.ical_schedule
        - calendar.uk_holidays
      initial_view: list
  - type: horizontal-stack
    cards:
      - type: conditional
        conditions:
          - entity: media_player.echo_1
            state: playing
        card:
          type: custom:mini-media-player
          entity: media_player.echo_1
          name: Living Room Echo
          artwork: full-cover
          sound_mode: icon
          source: full
          info: scroll
          line_width: 10
      - type: conditional
        conditions:
          - entity: media_player.echo_dot_clock
            state: playing
        card:
          type: custom:mini-media-player
          entity: media_player.echo_dot_clock
          name: Kitchen Echo
          artwork: full-cover
          sound_mode: icon
          source: full
          info: scroll
          line_width: 10
      - type: conditional
        conditions:
          - entity: media_player.downstairs
            state: playing
        card:
          type: custom:mini-media-player
          entity: media_player.downstairs
          name: Downstairs Echo's
          artwork: full-cover
          sound_mode: icon
          source: full
          info: scroll
          line_width: 10
      - type: conditional
        conditions:
          - entity: media_player.everywhere
            state: playing
        card:
          type: custom:mini-media-player
          entity: media_player.everywhere
          name: All Echo's
          artwork: full-cover
          sound_mode: icon
          source: full
          info: scroll
          line_width: 10

^^^^ this one works fine ^^^

but then then no matter what I try for the spotify intergration, either spotcast, media player, vertical stack, single card no matter which conditional card combo or single I try it just stays blank, even if I put say just echo 1 is state playing, or is not state standby it simply just will not show…

type: conditional
conditions:
  - entity: device_tracker.living_room_echo
    state_not: standby
  - entity: device_tracker.kitchen_echo
    state_not: standby
card:
  type: custom:spotify-card
  limit: 10
  spotify_entity: media_player.spotify_richieb
  playlist_type: default
  account: default
  grid_covers_per_row: '5'
  grid_show_title: true
  display_style: grid
  card_mod:
    class: hki
  hide_chromecast_devices: true

neither does

type: vertical-stack
cards:
  - type: conditional
    conditions:
      - entity: media_player.echo_1
        state_not: standby
      - entity: media_player.echo_dot_clock
        state_not: standby
      - entity: media_player.everywhere
        state: standby
      - entity: media_player.downstairs
        state: standby
    card:
      type: media-control
      entity: media_player.spotify_richieb
  - type: conditional
    conditions:
      - entity: media_player.echo_1
        state: standby
      - entity: media_player.echo_dot_clock
        state: standby
      - entity: media_player.everywhere
        state: standby
      - entity: media_player.downstairs
        state: standby
    card:
      type: entities
      entities:
        - entity: sensor.air_quality_sensor_co2
          name: CO2
        - entity: sensor.air_quality_sensor_formaldehyde
        - entity: sensor.air_quality_sensor_humidity
        - entity: sensor.air_quality_sensor_temperature
        - entity: sensor.air_quality_sensor_voc
          name: VOC
          icon: mdi:bottle-tonic-skull-outline

ot just trying to simpliify it as a seperate card it does not show up

type: conditional
conditions:
  - entity: device_tracker.living_room_echo
    state: playing
  - entity: media_player.echo_dot_clock
    state: playing
card:
  type: media-control
  entity: media_player.spotify_richieb

is this normal, as I said the top one works fine

device_trackers are only home, not_home, or zone name.

1 Like

ha ha my bad I selected the wrong ones for that example from list, but the its still the same as media player dissapears when condition is playing, anything related to spotify.

this still does not work

type: conditional
conditions:
  - entity: media_player.echo_1
    state_not: standby
  - entity: media_player.echo_dot_clock
    state_not: standby
card:
  type: custom:spotify-card
  limit: 10
  spotify_entity: media_player.spotify_richieb
  playlist_type: default
  account: default
  grid_covers_per_row: '5'
  grid_show_title: true
  display_style: grid
  card_mod:
    class: hki
  hide_chromecast_devices: true

it seams no matter what card i choose for spotify mini, normal media control they just stay hidden I despite conditions being playing.

Both have to be playing. The conditions are ‘AND’, not ‘OR’.

oh really, ill try as I just setup from the ui and the first code in the post worked without and, or in them… ill givve it a wurl, thank you pedro

No, maybe you aren’t understanding. The list of conditions is anded together. There is no word and, it’s just done that way. So both need to be playing.

Ok thanks again for your help buddy, believe it or not (I know you do believe it lol) this is my first time using conditional card, again thank you this works for me now.

type: vertical-stack
cards:
  - type: conditional
    conditions:
      - entity: media_player.echo_1
        state: standby
      - entity: media_player.echo_dot_clock
        state: standby
      - entity: media_player.everywhere
        state: standby
      - entity: media_player.downstairs
        state: standby
    card:
      type: entities
      entities:
        - entity: sensor.air_quality_sensor_co2
          name: CO2
        - entity: sensor.air_quality_sensor_formaldehyde
        - entity: sensor.air_quality_sensor_humidity
        - entity: sensor.air_quality_sensor_temperature
        - entity: sensor.air_quality_sensor_voc
          name: VOC
          icon: mdi:bottle-tonic-skull-outline
  - type: horizontal-stack
    cards:
      - type: conditional
        conditions:
          - entity: media_player.echo_1
            state: playing
        card:
          type: custom:spotify-card
          limit: 10
          spotify_entity: media_player.spotify_richieb
          playlist_type: default
          account: default
          grid_covers_per_row: '5'
          grid_show_title: true
          display_style: grid
          hide_chromecast_devices: true
      - type: conditional
        conditions:
          - entity: media_player.echo_dot_clock
            state: playing
        card:
          type: custom:spotify-card
          limit: 10
          spotify_entity: media_player.spotify_richieb
          playlist_type: default
          account: default
          grid_covers_per_row: '5'
          grid_show_title: true
          display_style: grid
          hide_chromecast_devices: true

should spend more time code learning over icon creating :stuck_out_tongue: or just used the custom state-switch card…

1 Like