Better Blueprint to report when any battery device (Zigbee/Zwave etc) or Zigbee/Zwave SmartSwtich has gone offline

Thanks @kyemacdonald. The “null” failure is likely because that switch doesn’t belong to a Device.

Clarification: This is a physical switch right? That you want to get notified if it goes offline? Or is it some sort of virtual switch?

The reason I ask is there are two ways to handle this, we can either have the automation “ignore all switch entities that are not part of a Device” (thanks to advice from @finity) The other option is: if a Switch Entity is offline, and is not part of a Device, then I can just return the Entities name, instead of the “non-existant Device name”.

I don’t have anything like this, so I need advice from you two on how best to handle that kind of case…

In the meantime, FYI here is my earlier blueprint, basically the same except it returns Entities instead of Devices, so it should work for you now.

(I found this behaviour a bit annoying, if one Physical Device, with 5 sensors, fell off the network, then I would 5 notification lines on my phone instead of one - (or a long rambling list from spoken from Google Nest) - just saying the device name makes more sense, for me)