I want 3 lights on the ground floor to be turned on when one (of three) switches are turned. Two lights are attached to a Fibaro Dimmer. When the Fibaro dimmer is switched on, its status changes to 'Set Level 60', where 60 represents the dimlevel.
So I require the following (pseudo) LUA code:
Code: Select all
if (devicechanged['Licht Voorkamer'] == '[b]Set Level *[/b]' and otherdevices['Licht Achterkamer'] == 'Off' and otherdevices['Licht Keuken'] == 'Off') then
commandArray['Licht Achterkamer']='On'
commandArray['Licht Keuken']='On'
end
Code: Select all
if (devicechanged['Licht Voorkamer'] ~= nil ) then
if (devicechanged['Licht Voorkamer']:match("Set Level %a") and ...
- Devicechanged needs to return a boolean, which it does not do in this code
- I don't understand how the stringmatching works in LUA
Any help is appreciated!
Ps:
Negatieve testing does not work

Code: Select all
if (devicechanged['Licht Voorkamer'] ~= 'Off"