jsurpless Posted July 28 Share Posted July 28 I've configured a script on a Plus 2PM ('BLE in Scripting - Shelly BLU Motion script actions') to turn one of the associated lights ON/OFF, depending on the BLU Motion state. I was able to find an example elsewhere that disables the motion handling if the specific light switch is ON (i.e, don't turn the light OFF once motion is done IF I turned it ON). Now, I would like to further enhance it so that the light only turned ON if it's dark out. I figure that I can read the 'illuminance' from the BLU motion; however, not sure how to do this outside of the IlluminationHandler. Would I need to set a common variable inside the IlluminationHandler that's then read by the MotionHandler? If so, I also think that I would need to change the order of the two handlers because it seems like the Motion executes first? Many thanks in advance! Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
cLick Posted September 10 Share Posted September 10 Late response but the handlers also have eventData parameters. You can use eventData.illuminance from within motionHandler. Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.