Entity-Filter + "if not" .. with multiple expressions

I have an entity-filter card and do not want to show pepole that are either “offline” or “unknown”. If I only put one in it works … if I extend for a second it does not work. I assume a language issue?

this works:

type: entity-filter
entities:
  - entity: sensor.ric_******
state_filter:
  - operator: '!='
    value: offline
card:
  title: Discord Online

this does not:

type: entity-filter
entities:
  - entity: sensor.ric_******
state_filter:
  - operator: '!='
    value: offline
  - operator: '!='
    value: unknown
card:
  title: Discord Online

You can also specify multiple state_filter conditions, in which case the entity will be displayed if it matches any condition.
Entity filter card - Home Assistant

I’m not sure if there’s anything like an and function available. I guess not in should work:

type: entity-filter
entities:
  - entity: sensor.ric_******
state_filter:
  - operator: 'not in'
    value:
      - offline
      - unknown
card:
  title: Discord Online
7 Likes

That syntax works! Thanks a lot. :slight_smile: