This is my first post and I have currently made many scripts in LUA in domoticz for better automate my home.
One thing that I have not find any information is to iterate within a group in LUA.
Perhaps it is not possible?
I have a group called Group:Mysbelysning
which contains a number of switches.
In general I would like that if you light one of the switches included, all of them light up, whereas if you turn off one of the switches included, all
of them turn off.
The scripts works fine, but I would like to not make an array of switches in LUA, and then have that information in duplicate within the group.
So is it possible in LUA to read the name of the switches and add them to an array so I can read them using...
Code: Select all
ncount=0
for _,name in ipairs(sensorlist) do
if (otherdevices[name]==status) then
ncount=ncount+1
end
end
return ncount
which should be read from the Group
Cheers
MenzZana