Lovelace filtering of cards

Is there a way to hide or display cards based on some rules?

For example when the alarm.panel is “armed” - display an image card from the camera and also an entity card containing the statuses of motion sensors, door sensors and also maybe a map where everybody is.

probably some can be done with entity-filter

Well entity filter takes several entities ( let’s say a,b,c,d) and their states and displays them accordingly like a,c,d

What I want to accomplish is to display or not display b,c,d according to the state of a.

P.S. I know about group visibility from the automation, but in my experience it is working unreliably. So i am hoping it could be solved via the lovelace UI

It is possible with entity filter. Just check docs

I have checked them already. Still lost. As an example of what i want to achieve

   - type: entity-filter
     entities:
       - alarm_control_panel.home
     state_filter:
       - armed_away
     card: 
       type: vertical_stack
       cards:         
       - type: entities
         show_header_toggle: false
         entities:
           - input_boolean.rules_away
           - input_boolean.rules_cominghome
           - sensor.time_to_home
           - sensor.gidrolocs_status
       - type: horizontal_stack
         cards:
         - type: entities
           show_header_toggle: false
           entities:
             - input_boolean.rules_away
             - input_boolean.rules_cominghome
             - sensor.time_to_home
             - sensor.gidrolocs_status
         - type: map
           aspect_ratio: 100%
           entities:
             - entity: device_tracker.myself
             - entity: device_tracker.wife

Should it be vertical-stack and horizontal-stack? You have vertical**_stack** and horizontal**_stack**.
Also the indentations seem off after the vertical_stack/cards, I’ve something like this:

  • type: entity-filter
    entities:
    • light.dining
      state_filter:
    • ‘on’
      card:
      type: vertical-stack
      cards:
      • type: picture-glance
        image:

well it was just an example… Maybe i’m mistaken…

In your example you have light.dining and an entity filter of “on”
So if the light.dining will be on can a card be displayed below with the following enitites

Movement dining = off
Dishwasher = on
Kitchen air cond = cooling 22C
Kitchen media player idle

And when you switch off light.dining to off all the above entities and their cards will be hidden until you switch on light.dining once again?

Yes, when my light.dining turns on, UI display the picture-glance card (with its own entities list). Otherwise, nothing get displayed.

Picture glance might be an option. But looking at the documentation it seems that the entities dispalyed in the picture glance will be the same as in the entity filter conditions? Am i wrong?

Actually, you are right, type: entity-filter card only show entities from the defined list with indicated state_filter, no matter what card-style follows.
Sorry, for the confusion.

Well hopefully it will be integrated soon.Will try to open a feature request.
As a usecase
For example you can have a big block of controls for the av system. Like volume, Different EQ, options and there is no point in displaying it unless the receiver is on.

Still learning the lovelace myself, love it so far, amazing group here :slight_smile:

Sorry to bring this up again but I think my use-case is very similar if not identical to the @moskovskiy82
What I want to acheive is show the time home / work (they are currently in a group) based on a sensor’s state
Is there any solution in Lovelace for this ?

Just found out about the conditional card which is exactly what I need :

- type: conditional
        conditions:
          - entity: sensor.occasion
            state: "work_morning"
        card:
          type: entities
          entities:
            - sensor.ohad_travel_time_to_work
            - sensor.rinat_travel_time_to_work