Best way to send notification if any light goes on when I’m away


#1

I know how to set this up with lights going on being the trigger and condition based on presence, but the piston will always fire any time I turn any light on. I wasn’t sure if this was an issue since it’s running so much and if there’s just a better way to do this to only fire when I’m away. 1) Give a description of the problem
(PUT YOUR INFO HERE)

2) What is the expected behaviour?
(PUT YOUR INFO HERE)

3) What is happening/not happening?
(PUT YOUR INFO HERE)

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#3

I’m on my phone and the snapshot wouldn’t work for some reason, so I took a screenshot. That being said the piston works. It’s just that the piston checks for conditions every time I turn on a light in my home, so it does check a lot and I wasn’t sure if there was a better way since my understanding is always triggers first then conditions. Is there a way that once conditions are met, then it starts checking triggers?


#4

Triggers remain misunderstood. Pistons default to looking only at triggers when deciding which device events to subscribe to and time events to schedule. That’s basically it. Once the piston runs in response to an event they are just comparisons.

‘Triggers first, then conditions’, can be useful advice as triggers like ‘changes to’ need to be evaluated to work properly. However most times I see it quoted it is actually not actually important.

As to your particular question, something will always have to handle the trigger event and consider the restrictions. This could perhaps be handled more efficiently elsewhere, but then it wouldn’t be webCoRE as you know it. Much of the power of webCoRE comes from you being able to control that sort of thing.


#5

Would this be better?


#6

No, because in webCoRE changes to requires that the piston is running because the device attribute in question has changed. So if the presence sensor has changed to not present then none of the switches can have changed.

Your original piston really was fine.


#7

Ok thanks.