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

as a followup and not to duplicate posts: Sensor - Unavailable/Offline Detection