How can I check if my sensor has gone offline?

I have quite a few wireless sensors around the house (thread/matter and zigbee). Majority of them are battery powered. Every now and then one of them stops reporting and needs to be power-cycled. Is there a way to detect that they stopped reporting? I’m basically looking for some sort of automation that will notify on my phone - sensor X stopped working - have a look. At the same time - I want this be relatively easy to use, so just giving the device a label should be sufficient to add it to the list of checked devices.

I can see that the UI shows the “Last updated”:

But I’ve also noticed that if the sensor doesn’t change (like a door sensor) - it doesn’t report any updates. At the same time - if the sensor stops working my Matter server notices and marks the device as ‘offline’. Is there a way to propagate that event into HA somehow?

Perhaps someone has already created an automation like that?

A recent, similar discussion. Remember to search for similar topics.