{{ states | selectattr('state', 'in', ['unavailable', 'unknown', 'none']) | map(attribute='entity_id') | select('search','lqi*') | list | join(', ') }}
It produces a list of all entities where their state is either unavailable, unknown or none, where the entity id contains the text ‘lqi’. On my system it produces this output:-
Thanks for the heads up.
This now lets me hopefully remove the dependency on ZHA Toolkit to alert me when ZHA devices drop off the network using a pretty trivial automation.
For this to work, you need to expose the LQI entity thats usually hidden for zigbee devices, but I do this routinely anyway for a dashboard page I have:-
I decided to use a simple time based trigger rather than a template trigger as I don’t need to instantly know when it happens, and I don’t want to be spammed if they drop in and out.