is there a way to send one command to multiple devices?
for example: one light-setting command to 3 diverent bulbs? instead of writing 3 times olmost the same code with diverent IDX numbers.
Code: Select all
return {
active = true,
on = { devices = {38}
},
logging = { level = domoticz.LOG_DEBUG
},
execute = function(dz, item)
if item.state == 'On' then
dz.devices(12).setColor(0,0,0, item.level, 0, 255, 2, 255).silent()
dz.devices(14).setColor(0,0,0, item.level, 0, 255, 2, 255).silent()
dz.devices(16).setColor(0,0,0, item.level, 0, 255, 2, 255).silent()
else
dz.devices(12).switchOff().silent()
dz.devices(14).switchOff().silent()
dz.devices(16).switchOff().silent()
end
end
} i try to do something like this:
Code: Select all
dz.devices(12, 14, 16).setColor(0,0,0, item.level, 0, 255, 2, 255).silent()