Dashboard Entity Card - Filter Include Not

Hello all -

I have the below currently working as a card on my Dashboard to show lights and fans that are on right now:

type: custom:auto-entities
show_empty: true
card:
  type: entities
  title: Lights and Fans On
  state_color: true
  show_header_toggle: false
filter:
  include:
    - domain: light
      not:
        name: /LED/
      state: 'on'
    - domain: switch
      not:
        name: /LED/
      state: 'on'
sort:
  method: friendly_name

I’m trying to also filter out any switches with the word Filter anywhere in the name. So, any light with the word LED, or any switch with the word LED, or any switch with the word Filter… none of those entities should show up.

I’ve tried so many combinations, including vertical pipes, multiple includes, multiple not’s, curly brackets, square brackets, commas, parenthesis, quotations. But I’m spinning my wheels now and am totally stuck on what to try. Searching here and on Google for YAML surprisingly hasn’t helped a ton in this circumstance.

  1. Edit your thread’s title - seems to be a typo.
  2. Ask these questions in a dedicated auto-entities thread: keep knowledge in one place instead of 100500 threads, get your answers faster.
  1. Done.
  2. A link would be helpful. I looked, all I can find is the aforementioned 100,500 threads within this same forum subcategory of Configuration-Frontend. I added lovelace as a tag.

While I couldn’t find the answer to my original question (how to include not: multiple wildcard words), I was able to add a straight exclude that worked. Here it is for others that stumble upon this:

type: custom:auto-entities
show_empty: true
card:
  type: entities
  title: Lights and Fans On
  state_color: true
  show_header_toggle: false
filter:
  include:
    - domain: light
      not:
        name: /LED/
      state: 'on'
    - domain: switch
      not:
        name: /LED/
      state: 'on'
  exclude:
    - name: /Filter/
sort:
  method: friendly_name
1 Like