SolarFlor you can use the next eazyLogic code for your logic.
Code: Select all
// Turn off dimmer after 10 sec after motion sensor is off.
_z('motion sensor').onOff( function() {
if(_z('Motion Sensor Luminiscence').getLevel() < 50) _z('dimmer on desk').delay(10).on()
})
How it works.
We watch when 'motion sensor' is turned off.
When the sensor goes off then function is called.
In this function we check that 'Motion Sensor Luminiscence' level is less then 50 and then turn on 'dimmer on desk' with delay in 10 sec.
All the names used above you can find in widgets list in Preference menu (Widget name field)
You can select not only one device to control (ex.'dimmer on desk'), but a group of device, devices in particular room, etc.
more...
Be aware that the eazyLogic module is just at the very beginning of development and there are a lot things to be done to make it error proof, improve stability and usability and all comments are welcome
The code above written in plain Javascript and you can use any logic with it, comments, or use variables.