now i want to loop through all these items everytime instead of doing a trigger lookup.
can anybody point me in the right direction because i can not comprehent the foreach stuff
Code: Select all
local lookup = {
Bamboelampklok = "100" ,
Dressoirlamp = "101" ,
Dressoirlamptoog = "102" ,
LampachterTV = "103",
Bamboelamphoek = "104" ,
Plafondspots = "105" ,
Vitrinekast = "106" ,
Tuinlampen = "107" ,
Tuinsproeier = "108" ,
Woonkamerlampen = "109" ,
WoonkamerlampenSfeervol = "114" ,
SceneNormaal = "110" ,
SceneRyan = "111" ,
SceneSfeervol = "113" ,
SceneLezen = "112" ,
}
execute = function(domoticz, trigger)
local habridgeid = lookup[trigger.name]second variable to hold the id of that device (the number behind the name)
and that part looping until i have gotten through all the devices specified under lookup.
can this be done with one lookup table or do i need 2 seperate tables