Conditional card does not work

Hi there!

I’m wondering the conditional card does not work as desired.

Here my examle:

type: conditional
conditions:
  - condition: state
    entity: media_player.sonos_kueche
    state: playing
card:
  type: media-control
  entity: media_player.sonos_kueche

You can see on the screenshots that the status of media_player.sonos_kueche is paused. However, the card shows the player even if the conditions says state should be playing. Regardless what condition I’m entering, it shows the media player.

Any ideas?

Many thanky in advance!

PS: When testing for the condition in the editor the system notices that the condition is not fulfillef but still does the opposite:

Go to developer tools → states page and look at the state of the media player there. I don’t see anything indicating that the state is not playing in your screenshots. You should always consult the developer tools states page for the actual state. Do not try to guess the state from the UI.

Secondly, when posting screenshots, post them in English or don’t post them at all.

Solution (or question :slight_smile:) was rather stupid:

  • status was paused
  • but I did not know the prview in the editor shows the card regardless whether the condition of the card is true or false. Condition applies when finishing the editor of both card and lovelace…
1 Like