I going to create a script handling with lights downstairs. I created an array with devices and want to add or remove a device depending on its state.
As far I understood, to add or remove a value from an array I have to use LUA (?)
My script (especially 2nd line)
Code: Select all
local lights = domoticz.devices().filter({ 'LedRelaxSides', 'LedRelaxMiddle', 'LightRelaxLibrary', 'LightRelaxWall'})
local lights2 = domoticz.utils._.pull(lights, 'LedRelaxSides')
lights2.forEach(function(light)
domoticz.log(" TEST " .. light.name)
end)
What do I wrong?
Thank you in advance.