Is it possible to add a condition that checks to see if another WebCore piston status is TRUE or FALSE.
For Example: I have a piston named ‘Home’ that simply checks if I am home and turns on a light, turns off the light when I leave. I’d like to create a new piston that will check the status of the Home piston.
Referencing another Pistons Status
I don’t know for sure if this is possible. Plus piston states will change after executing.
You could set a global variable in the home piston and check that variable in the other piston. Or simply check if presence is present.
Hey disforw
Did you find an answer to your question???
I am also looking for a way to check piston status.
thanks
It sounds like you want a ‘global variable’ to solve this. To create a global variable, simply edit any piston, and in the far right column, underneath “Global variables” click on:
+ add a new global variable
You can change the type here, but boolean is likely best for your situation. Make sure the name begins with @, such as @home.
(Variables that begin with @ are accessible & editable from all pistons within the same instance of webCoRE)
In your piston called ‘Home’, you can add one line:
Set variable @home = true
When you get home…
and in that same piston, when you leave, add another line:
Set variable @home = false
In your new piston that wants to check to see if you are home, simply have that piston do this:
IF variable @home = true
Then Do Blah blah blah
Else do Blah blah blah
End IF