Notification when location mode changes?

Here’s a simple webCoRE piston I want to replicate; what’s the easiest way to do something like this?

I have others which do similar based on STHM events or dynamically send notifications based on which alarm sensor was triggered etc.

I am guessing Rules API?

execute
if
Location mode changes
then
Send PUSH notification “Location mode changed to {$locationMode}” and store in Messages;
end if;
end execute;

I did this with 3 different automations. One for each location mode. I had scenes running for those modes anyway, so I just added a notification to the end of the automation. It shows up in the logs and you can direct it to any household member(s) you want.

Thanks. Yes that would work for this example but the alarm has >20 devices.

Unfortunately not. The Routines can use notifications, implying that the required functionality exists in Rules. However it isn’t documented and I’m not sure it is even enabled outside Routines. It is infuriating.

Routines can’t yet get the current mode into the notification. Not can Rules.

A custom SmartApp could do it but even then the Notifications API isn’t documented, though the basics are known.

1 Like