How to list all sensors with state = 'unavailable', 'none' or 'unknown'

you want to expand('group.your_group') that group, instead of using all states.binary_sensor

really another topic ofc, so search the community for expand() and you’ll find many examples

this is a good place to start: Unleash the power of 'expand' for Template Sensors