1) Give a description of the problem
Can’t seem to nail down the “time since last lighting change.”
2) What is the expected behaviour?
I have two pistons set up to automatically turn on or turn off kitchen lights based on reporting from a Aqara motion sensor set up in the kitchen. I would like for the kitchen lights (switches) to automatically turn off whenever 65 or greater lux is reported by the motion sensor. I also have it set to turn the lights on if the lux drops below 45 AND there is motion detected (I don’t want the lights to turn on automatically if the room is empty). Lastly, I don’t want any of this to happen if the lights have been switched on or off in the last 30 minutes, manually or programmatically (to avoid auto lights off if someone just turned them on or in cases of lux fluctuation - I don’t want lights turning off and on every single time the lux threshold has been met). All of this only occurs between sunrise and sunset.
I’m new to WebCore: should this all be in one piston, as opposed to two?
3) What is happening/not happening?
The “don’t execute this” parameter doesn’t seem to be working. I’ve tried it a few different ways, but, for example, the “turn off” piston executed based on lux, where I then I used voice to turn the lights back on, only for them to instantaneously turn back off.
**4) Post a Green Snapshot of the piston