Push notification when status changes with status

Is there a way to create a piston that sends a push notification every time the status changes which will also include what the current status is in the notification? Right now I’m using a smart app to notify me of changes, but it doesn’t include the status.

Sure, add a new Basic piston like the following:

If 
    [presence sensor] changes
then
    using location, send push notification "{$currentEventDevice} is {$currentEventValue}"

This will produce a push notification that says “So-and-so is present” or “So-and-so is not present”

Alternately, you could do something like this with a Simple piston where you enter your own text:

if 
    [presence sensor] is present
then 
    using location, send push notification "So-and-so arrived at home"
else
    using location, send push notification "So-and-so left home"
1 Like

My apologies for not being more clear - I was actually looking for notifications about the location status.

Ah ok. Try this then. $locationMode is a system variable in CoRE that shows the current mode.

If
    [presence sensor] changes
Then
    using location, send push notification "mode is {$locationMode}"

How do I set the variable? Do I need to first put it into the global variables section?

Thank you so much!

1 Like

I was wondering if anyone could tell me what other system variables are available to use?