14.12.2022, 10:05
(14.12.2022, 08:10)admin Wrote: Use grp.find to check if an object with a given name already exists:
Code:name = 'test object'
if not grp.find(name) then
grp.create({ name = name, ... })
end
Many many thanks!
One more - hopefully last - question:
How do I automatically add the entries in the mqtt_to_object_conv and object_to_mqtt tables? I also need to be able to read the name between two characters example: Floor_1_Room_302_Device_3 how do I loop through it to bind each element to part of the name?