Little history/overview and desired outcome.
I am using HA on Debian PC using virtual environment, zigbee mqtt , etc. etc.
I as all of you have a fleet of Wi-Fi devices (more that 40) and use device tracker component.
The problem is that I can list all devices (device.tracker) on a card or badge and see witch is home or away ,
BUT I WANT TO VIEW/SEE ONLY AWAY DEVICES in the front UI. I want to be able to quickly see only disconnected or missing devices from the network. I use known_devices.yaml and customize.yaml
Any way to do this?
P.S. I did search the forum and found view suggestions in other threads but no final answer.
This custom card will do what you want:
I use the entity-filter card to display doors that are open and not doors that are closed.
Since 0.101 it also seems possible to filter badges in a lovelace view.
I am thankful to all of you for the hints.
I did managed to make it using simple entity-card.
2 hint points for other who want to do this or similar to this filtering.
1-Use the visual editor to add all entities and then apply filtering, because it is easy. After that you have only code editor.
2-Awey devices are actually with state not_home. That is one of the things that slowed me down.
Here is the code I used for the card:
card:
title: Offline Devices
type: glance
entities:
- device_tracker.sys_xtreme_pc
- device_tracker.xiaomi_zigbee_hub
- device_tracker. and so on and so on
state_filter: - not_home
type: entity-filter
I just changed a bunch of cards from auto-entities to entity-filter cards. It takes quite a bit more configuration but the performance gain on older display devices is worth it.