You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
To bulk include devices, you would typically write
filter:
include:
- name: attributes.device_class
value: battery
However, I have many devices that have battery low state attribute classified as device_class: battery.
This means that instead of displaying battery percentage, the card displays On or Off, and no battery percentage, since it includes only one (first) attribute of the entity that matches.
Since there is no AND in include, I cannot write something like this:
filter:
include:
- name: attributes.device_class
value: battery
- type: AND
- name: attributes.state_class
value: measurement
that would actually filter my entity attributes properly.
Is there any way around this?
The text was updated successfully, but these errors were encountered:
If your problem devices had battery percentage classified as device_class battery, that would display as well as battery low state.
It could be that those devices only offer battery state (values 0, 1, 2), in which case you could use state_map: to map those states to artificial percentages (eg, 25%, 50%, 100%).
Or it could be that the battery percentage for these devices is being classified as device_class measurement. You should be able to find some other filter method to include them, and use an exclude: to exclude the battery state you don't want. Alternatively maybe you can you use the attribute: option to pick out the attribute you want. Also suggest use the debug: option to inspect what is actually available.
Describe the bug
To bulk include devices, you would typically write
filter:
include:
- name: attributes.device_class
value: battery
However, I have many devices that have battery low state attribute classified as device_class: battery.
This means that instead of displaying battery percentage, the card displays On or Off, and no battery percentage, since it includes only one (first) attribute of the entity that matches.
Since there is no AND in include, I cannot write something like this:
filter:
include:
- name: attributes.device_class
value: battery
- type: AND
- name: attributes.state_class
value: measurement
that would actually filter my entity attributes properly.
Is there any way around this?
The text was updated successfully, but these errors were encountered: