Script LUA: storing dimmer value
Posted: Wednesday 28 December 2016 13:57
Hello,
I'm new to the Domoticz and scripting in LUA. I would like som help to make a script for a dimmable light. I have searched the forum but could not find an awnser.
If the light is on, and there is no movment for 15 minutes i want to store the actual light level and dim the light.
If there is movment detected the light should return to the stored level. (before dimming)
if deviceValue["MotionDetector"]=='off'
then uservariables["Previous_Dim"] = otherdevices_svalues['Dimmer']
otherdevices_svalues['Dimmer'] = '15'
end
I'm new to the Domoticz and scripting in LUA. I would like som help to make a script for a dimmable light. I have searched the forum but could not find an awnser.
If the light is on, and there is no movment for 15 minutes i want to store the actual light level and dim the light.
If there is movment detected the light should return to the stored level. (before dimming)
if deviceValue["MotionDetector"]=='off'
then uservariables["Previous_Dim"] = otherdevices_svalues['Dimmer']
otherdevices_svalues['Dimmer'] = '15'
end