Selector switch & Inverted blind
Posted: Saturday 06 April 2019 14:09
Can some help me with the Close or off. Both doesn't seem to work.
This is my first (self made) Lua script and I set it to "device".
So the state "Open" works. But "Close" or "Off" doesn't!
R1 is inverted blind switch
R2 is selector switch
This is my first (self made) Lua script and I set it to "device".
So the state "Open" works. But "Close" or "Off" doesn't!
R1 is inverted blind switch
R2 is selector switch
Code: Select all
commandArray = {}
if devicechanged['RolgordijntestR1'] == 'Close' then
commandArray['RolgordijntestR2']='Set Level: 10'
end
if devicechanged['RolgordijntestR1'] == 'Open' then --Inverted blind switch
commandArray['RolgordijntestR2']='Set Level: 20' -- Works!
end
if devicechanged['RolgordijntestR1'] == 'Off' then
commandArray['RolgordijntestR2']='Set Level: 30'
end
return commandArray