thomasloven / lovelace-auto-entities

🔹Automatically populate the entities-list of lovelace cards
MIT License
1.2k stars 111 forks source link

"Filter, Exclude, Not" not working #313

Closed niecore closed 1 year ago

niecore commented 1 year ago

Hello,

I am expecting that the following card would list me all temperature and illuminance sensors from the area office but instead humidity/temperature sensors off all rooms are listed:

type: custom:auto-entities
card:
  type: glance
filter:
  include:
    - domain: sensor
      attributes:
        device_class: temperature
    - domain: sensor
      attributes:
        device_class: illuminance
  exclude:
    - entity_category: diagnostic
      not: 
        area: office

The not special parameter within the exclude section is not working for me.

ildar170975 commented 1 year ago

Why do you use unsupported entity_category option? It is not mentioned in the docs, no wonder it is ignored.

niecore commented 1 year ago

Why do you use unsupported entity_category option? It is not mentioned in the docs, no wonder it is ignored.

entity_category is working perfectly. not sure why it is not documented but I found it via a pull request that got merged previously.

ildar170975 commented 1 year ago

Well, this code works: image It only shows demo trackers (Ann, Paulus & Home Boy) and unavailable Life360 trackers.

type: custom:auto-entities
card:
  type: glance
filter:
  include:
    - domain: device_tracker
  exclude:
    - entity_id: '*ping*'
    - entity_id: '*traccar*'
    - entity_id: '*composite*'
    - entity_category: diagnostic
      not:
        state: unavailable