Skip to content

Template filters

Thomas Lovén edited this page Jun 29, 2021 · 1 revision

Template filters gives you lots of extra power - especially when combined with layout-card.

Eg:

type: custom:auto-entities
card:
  type: custom:layout-card
  layout_type: masonry
  layout: {}
  cards: []
  view_layout: {}
filter:
  exclude: []
  include:
    - domain: light
      options:
        type: custom:auto-entities
        card:
          type: custom:layout-card
        filter:
          template: |
            {{ [
              {
                "type": "entities",
                "title": state_attr(config.entity, "friendly_name"),
                "entities": [config.entity]
              },
              {
                "type": "button",
                "entity": config.entity
              }
            ] }}

image

Clone this wiki locally