I already have a LUA device script that I am using but I would like to add some additional functionality to it.
This is what I am using now:
Code: Select all
commandArray = {}
if (devicechanged['Stue dimmer S2 1 click'] == 'On') then
commandArray['Group:LivingRoom']='On'
elseif
(devicechanged['Stue dimmer S2 2 click'] == 'On') then
commandArray['Group:LivingRoom']='Off'
elseif
(devicechanged['Stue dimmer S2 3 click'] == 'On') then
commandArray['Group:Alt lys']='Off'
end
return commandArray
If Group is Off --> Turn On
If Group is Mixed --> Turn On
If Group is On --> Turn Off
And I would also like the 3 click to additionaly turn off the Power device of my harmony hub, its just like a light switch so I just need to know where to put in the device reference.

Hoping someone can help!

Merry Christmas!