LOGIN  |  REGISTER
Smart Living Made Brilliant!
CASTLEOS FORUM

HomeScripting

A forum for information about scripting with CastleOS. Get samples, suggestions, and other help here

Scene - Run a Script On vs. Off Messages in this topic - RSS

Tommy Long
Tommy Long
Posts: 218


3/5/2017
Tommy Long
Tommy Long
Posts: 218
In the Scene editor you can add devices of course as well as add a script to run.
When the scene is activated ON, the devices turn on, and when the scene is deactivated OFF the devices turn off.
There is no "run script X when activated/ON" nor "run script Y when deactivated/OFF", just simply "run this script".
Since the same script is called either way, is there a way for the script to know whether the scene is being activated/ON or deactivated/OFF?
0 link