It is important to have unique names for your devices when you want to do scripting as that works with the names.

Jos
Moderator: leecollings
Code: Select all
commandArray = {}
searchname="Radiator"
print("Show status for devices containing:" .. searchname)
for name, idx in pairs(otherdevices_idx) do
if string.find( name,searchname) then
print("IDX=" .. idx .. " Name=" .. name .. " otherdevices[]=" .. otherdevices[name] .. " otherdevices_svalues[]=" .. otherdevices_svalues[name])
end
end
print("--- done-----")
return commandArray
Users browsing this forum: No registered users and 1 guest