Dimming, how to go back to former state
Posted: Wednesday 23 November 2016 18:31
Hi,
I'm very new to Domoticz and LUA. Although I had an education in programming (1985-1993) in Basic and GWBasic, this is a little bit different.
I want to make a script that turns a dimmer back to it's former state.
I want to dim the spots in my kitchen to 5% when I activate all other lamps in my livingroom. (this is easy with a standard Scene or Group).
So this is not the problem.
Now when I'm in the kitchen I activate a swith to turn the spots to 100%. When I leave the kitchen and press the 'off-switch' the spots goes out. But I want them to turn back to 5%.
When the lamps in the room aren't ON (group is off by switch). And I enter the kitchen and push the switch the spots must go to 100%, and when I put the switch off, the spots have to go OUT (because the roomlamps are OUT also)
How should I make this script? When I see a working script, I'll understand LUA much better and will be able to solve this kind of problems much more easier...
Thanks in advantage,
Hein Melissen (the Netherlands)
I'm very new to Domoticz and LUA. Although I had an education in programming (1985-1993) in Basic and GWBasic, this is a little bit different.
I want to make a script that turns a dimmer back to it's former state.
I want to dim the spots in my kitchen to 5% when I activate all other lamps in my livingroom. (this is easy with a standard Scene or Group).
So this is not the problem.
Now when I'm in the kitchen I activate a swith to turn the spots to 100%. When I leave the kitchen and press the 'off-switch' the spots goes out. But I want them to turn back to 5%.
When the lamps in the room aren't ON (group is off by switch). And I enter the kitchen and push the switch the spots must go to 100%, and when I put the switch off, the spots have to go OUT (because the roomlamps are OUT also)
How should I make this script? When I see a working script, I'll understand LUA much better and will be able to solve this kind of problems much more easier...
Thanks in advantage,
Hein Melissen (the Netherlands)