Conditional-card in Grid-card with Tile-card does not work

This is not working for me:

The fan.test are in state unavailable. I have tried with Unavailable, “unavailable”, ‘unavailable’ nd so on.
Changing from state_not to state with another condition does not change the result.

The tile-card disappears for two seconds, and then comes back. The state are not changed.

square: true
type: grid
cards:
  - type: conditional
    conditions:
      - entity: fan.test
        state_not: unavailable
    card:
      type: tile
      entity: fan.test

I just did this for a simple test to reproduce with the sun-entity.

square: true
type: grid
cards:
  - type: conditional
    conditions:
      - entity: sun.sun
        state: foo
    card:
      type: tile
      entity: sun.sun

Is this a bug or do I missunderstand the behaviour?

You may have figured this out already, but have you made sure you clicked DONE after making the changes, as when you are in preview mode you can see the conditional cards even if the conditions do not match.

I used your example, saved the edit, then clicked DONE and the card is not there. I have conditional grid cards all over my dashboards, likely over 100 of them, and they work as intended.

Before hitting DONE:

image

After hitting DONE:

image

Thanks for sorting it out! When I tested it I left only the preview dialog, but I was not leaving the EDIT-mode with the Done-button. I just reverted it before I clicked Done. :grimacing:

Leaving preview/edit-mode “fixed” it. :smile:

Yea, that threw me a bit when I first started using conditional cards and now am glad it’s there, so that when I edit the dashboard I know all my conditional cards and if I want to do anything with them - but it’s confusing at first.

Yes, now I can see and understand the benefit of it. :smile:
Thanks!

1 Like