I have been “getting my head” around the Lovelace interface. I hadn’t realized you can combine multiple cards into a single view.
I needed a view which shows what lights have been left on in the house (forgetful teenagers). If no lights are on the card disappears. This combines the conditional-card and entity-filter-card into a single view.
It uses the default group default.all.lights as the trigger for the conditional-card. If all lights are “off” then the entity-filter-card is not displayed. The entity filter card then displays any of the lights that are on. All this is achieved without a single line of code!
- type: conditional
conditions:
- entity: group.all_lights
state: "on"
card:
type: entity-filter
entities:
- < entity of light >
- < entity of next light >
- < etc >
state_filter:
- "on"
card:
type: entities
title: Lights left on
However it given me another idea. By combining both the conditional-card and entity-filter-card I can display or not display cards based on entity’s not contained in the entity filter , so for instance I can display which lights are on when everyone is out.