Thinking about this more, presence and notifications are two separate device capabilities. There is not necessarily a way to know if a notification device is "home" or not because these two capabilities do not need to be used together, even though some devices do implement both (like the Hubitat mobile app device — perhaps the most popular choice for both?). In this particular case, a notification device could be checked if it also has the presence attribute and, if so, whether it is present (or not not present ... or would anyone want the option to do the opposite?). If the device doesn't have the attribute at all, it could continue to work as-is, as it also could if this hypothetical option were not enabled.
Alternatively, for users who use these functions via separate devices, some option could be provided, either per app or per notification device (might get messy...), to send or not send notifications, either at all or to specific (possibly other) devices, based on that state.
As yet another alternative, I'm thinking it may be good to keep this out of the app and rely on another solution, like a "notification proxy" device, which could be configured at that level to do or not do something based on presence. This would also be more usable across a variety of apps without the app needing any specific functionality.
I'd have to "beef up" my app/driver combo that right now just groups devices (or allows you to create one virtual device that could stand in for even just one real device if that's all you want, say, because you don't want to have to swap them in apps all the time if you change devices), but that seems like a good candidate. I talked about that a bit here, though I've never made a thread just for it (and again, as-is, it probably can't quite do this):
Adding presence would be of value to me in the following use case:
I have some of my window sensors that occasionally drop off the mesh. I have an alarm notification that tells me that the alarm was armed with the following windows open… the status of those windows that have dropped off the mesh is not known, so I would prefer to ignore them in the notification. I could also have a separate notification that notifies me that some windows may be open, but this is unknown since the device is off the mesh…
Do you mean excluding devices from notifications if they "fell off" your network? This is a non-standard use of the presence attribute that I'd be unlikely to consider (and I don't think many drivers are using it anymore); my assumption above was that this was for the notifications themselves, e.g., do or don't send the whole thing based on your literal presence.
The biggest problem I see is that there is no standard way to determine that. I could ignore disabled devices, or least provide an option to (Device Activity Check does), though that won't really address the specific issue.
For my use case, adding an option to ignore “Not Present” when available would work, but even better would be something that can ignore devices that haven’t reported in 24 hours, as in the information found in the Zigbee Details screen…
Same. Just thinking I could have it announce certain off-line sensors if they are key to having a “secure” home. For now, I do all this with Rule Machine. (Though haven’t done the off-line bit yet…)
Any way you could add the ability for a custom message? So I could add something like, "It's raining, whateverdevicename is open. Close it please" instead of just "whateverdevicename open" ?
Another addition that would be good if it is even possible… Most of my devices are connected via hub mesh and therefore have “on C-7” or “on Hub” or “on Radios”, etc. appended to their name. It would be nice if there was a way to remove those from the device names before the notification occurs? Ideally, several options could be identified for removal… Possible?
Create a "group" but only with that one device. You can call it whatever you want, including a similar name without the "on X" part (though if you change the names, you'll have to manually keep them in sync).
My original intent here was so you could have something like a door lock and a contact sensor and get a notification like "front door is open and unlocked" instead of "front door lock is unlocked and front door contact sensor is open" (by creating a group with both devices and calling it "front door"), but it seems like it would work for your use case, too.
I just realized that I was using the 2.x version, and decided to look again at this app and redo my rule to the new version. I see it now has the option for setting the volume. Is there any way to make this be a Hub Variable? I am trying to have one place to change the volume on my announcements and this is one of the apps I use.