I'm trying to get this script to work, but I need a little help.
Code: Select all
return
{
on =
{
devices =
{
'Rookmelder woonkamer hitte',
'Rookmelder woonkamer rook',
'Rookmelder speelkamer hitte',
'Rookmelder speelkamer rook',
'Rookmelder overloop rook',
'Rookmelder overloop hitte',
'Rookmelder zolder rook',
'Rookmelder zolder hitte',
},
},
execute = function(dz, item)
local rmwh = dz.devices('Rookmelder woonkamer hitte')
local rmwr = dz.devices('Rookmelder woonkamer rook')
local rmsh = dz.devices('Rookmelder speelkamer hitte')
local rmsr = dz.devices('Rookmelder overloop rook')
local rmzh = dz.devices('Rookmelder zolder rook')
local rmzr = dz.devices('Rookmelder zolder hitte')
if (rmwh.state == 'On' or rmwr.state == 'On' or rmsh.state == 'On' or rmsr.state == 'On' or rmzh.state == 'On' or rmzr.state == 'On') then
commandArray['Overloop verlichting'] = 'Set Level: 20'
commandArray['Hal verlichting'] = 'Set Level: 20'
commandArray['Slaapkamer rolluik'] = 'Set Level: 0'
commandArray['Group Woonkamer'] = 'Set Level: 100'
commandArray['Buitenlamp bijkeuken'] = 'On'
commandArray['Buitenlamp voordeur'] = 'On'
end
end
}
Any help would be appreciated.
Kind regards,
Raymond