the devices are declared at the beginning of the script in MyDevices array
how can i do a loop on this array to declare the devices in data ={ }
Code: Select all
local MyDevices = {'device1','device2','device3'}
return {
active = true,
on = {
timer = { 'every 5 minutes' },
},
data = {
-- here i want to do a for loop to declare device1 device2 and device3
},