24.06.2019, 08:24
The easiest way to send multiple group address values is to assign a tag.
This example will output one name = value pair per line for all objects with alert tag:
This example will output one name = value pair per line for all objects with alert tag:
Code:
values = {}
objects = grp.tag('alert')
for _, obj in ipairs(objects) do
value = string.format('%s = %s', tostring(obj.name), tostring(obj.value))
values[ #values + 1 ] = value
end
result = table.concat(values, '\r\n')
log(result)