Conditional Card only works in preview

Hi,
I would like to insert a conditional card.
As soon as a switch is turned on, a card should be displayed that can control the corresponding light bulb (Hue).

Actually, the whole thing looks correct to me AND in the preview it works wonderfully. After saving the changes, however, the card is always visible.

Here is the code:

 type: conditional
 conditions:
   - entity: switch.kinds_licht_decke
     state: 'on'
 card:
   type: custom:mushroom-light-card
   entity: light.kinds_licht_hue
   name: Hue
   icon: mdi:ceiling-light
   collapsible_controls: true
   show_brightness_control: true
   tap_action:
     action: toggle
   secondary_info: none
   hold_action:
     action: more-info

Any ideas?

Home Assistant Version 2022.10.5

The preview screenshot is here: (i can only upload one media as a new user)

Welcome to the community!
Have you tried with another entity as condition?

1 Like

I spent some time with the family after the post and now looked in again and wanted to try your tip and well, how can I put it…it just works now without any change. I am now a little uncomfortable with this - as a first post. :slight_smile:

I thank you anyway :slight_smile:

No worries! Sometimes it helps just to talk about it. :grinning_face_with_smiling_eyes: