Could someone please help to write an automation to trigger whenever any of the 500 entities i have become unavailable for 30 seconds or more. I cant seem to find any info on how to do this. i thought maybe with trigger event on state_changed but i have no idea how to do something like this.
Very useful. Here’s another example where I use the same method to create a binary sensor that tells me if there is any open doors with a list of them as an attribute.