Open igorsantos07 opened 1 year ago
I tried leaving the value empty, as
''
, asnull
orundefined
Tried with all these & none
, does not work.
The only way seems to be using a template
option - here is a way to exclude entities with a defined device_class
:
type: custom:auto-entities
card:
type: entities
filter:
template: >-
{{ states.binary_sensor | rejectattr('attributes.device_class','defined') | map(attribute='entity_id') | list }}
sort:
count: 15
I'm very interested in this feature as well. Including or Excluding by some state or attribute value being UNSET would be incredibly useful
I didn't find in the docs if it's possible to filter by an empty or unset field/attribute. I tried leaving the value empty, as
''
, asnull
orundefined
(I know this ain't JS, but... and even then, undefined seems to work in this scenario), to no avail.In my scenario, I wanted to filter by
domain: switch
which is considered a switch, and not from anotherdevice_class
(and thus, it seems that attribute just isn't present, instead of beingswitch
).Is that possible? If not, maybe a new
unset
option (which would work similarly toor
, having anything inside it, but ignoring values) could be created?