[SOLVED] Thing rule syntax

Hi there,

I try to follow the official guide for thing based rules

Thing <thingUID> received update [<status>]
Thing <thingUID> changed [from <status>] [to <status>]

I can’t get my rule to work.

I have tried many variations and the documantion does not provide any examples.
Examples that can be found in the internet are with old syntax

One variation i try is this

rule “Inform with email if a device goes offline”
when
Thing “zwave:device:b17ec959:node2” changed [from ] [to ]
then
send sendNotification(“d.sideris@hypertech.gr”, “thing went offline!”)
end

So i am kind of confused.

Any help plz?

rule “Inform with email if a device goes offline”
when
    Thing “zwave:device:b17ec959:node2” changed from ONLINE to OFFLINE
then
    sendNotification(“d.sideris@hypertech.gr”, “thing went offline!”)
end

Thanks a lot. It worked!

Please mark the thread as solved, thanks