WTH is not possible to get unavailable devices?

Would be nice to easily know which devices are not available in order to make notification/automation out of those.

Currently only solution I found is to iterate all entity states and from there go back to the device.