Detecting when item in HA group goes unavailable

I have a group of contact sensors, that for some reason at around 3am at least one decides to go offline every night
These sensors are linked to my alarm system, so a few times now I’ve been woken due to the unavailable state

I’m detecting on a group in HA, but the group doesnt know that something in it went unavailable (so all these tick boxes don’t work as they would on an individual item)

Is there a way to detect if something in the group went unavailable in the past X minutes?
Or should I just bite the bullet and add each contact sensor as a trigger and be done with it?

Looking at the docs a group can have the following states

The group state is unavailable if all group members are unavailable.
Otherwise, the group state is unknown if all group members are unknown or unavailable.
Otherwise, the group state is on if at least one group member is on.
Otherwise, the group state is off.

So it shouldn’t be able to get through the event state with the way you have it set. You can try using the trigger node instead. Use 2 conditions, previous state is off, current state is on.

image

You could also try adding each sensor as a condition that the individual sensors previous state is off.

None of this though is the actual cause, you should probably try to fix the problem of the sensors going off line rather than trying to find a work around.

Hmm, so I think what is happening is that the sensors goes unavailable, then come back on to their previous state, which classes as an overall change in state

This is fair. I believe it’s due to an update I run at 3am every day. I have an exception to avoid that, but last night it didn’t alarm till 3.45am for some reason…
So it’s probably the ha restart causing it