Viking
1
I have an entity-filter
card using state_filter
to display the state of various entities only when their state is ‘on’
state_filter:
- 'on'
But is it possible to use ‘not_off’ instead of ‘on’ ?
I have tried all possible imaginable syntax combinations, but to no avail.
tom_l
2
The sixth one:
operator string (optional)
Operator to use in the comparison. Can be ==
, <=
, <
, >=
, >
, !=
, in
, not in
, or regex
.
So:
state_filter:
- 'off'
operator: '!='
Viking
3
Thank you, but that didn’t work. now it shows all entities with state = Off.
The ‘!=’ doesn’t seem to do anything.
petro
(Petro)
4
Please take the time to read the documentation. There’s examples that cover this.
state_filter:
- operator: "!="
value: 'off'
Viking
5
Yes, thank you. That works ![:ok_hand: :ok_hand:](https://community.home-assistant.io/images/emoji/twitter/ok_hand.png?v=9)
( it never occurred to me that “!=” means “not”)
tom_l
6
Please mark petro’ s post as the solution.
Also apologies for steering you incorrectly in the use of the operator option. I should have checked the documents.
Viking
7
That’s all right. @petro was right; it is my responsibility to read (and understand) the docs.
I appreciate all your help ![:blush: :blush:](https://community.home-assistant.io/images/emoji/twitter/blush.png?v=9)