16.05.2024, 09:43
Like this:
Code:
query = 'SELECT * FROM zb_devices WHERE batterylevel IS NOT NULL'
devs = db:getall(query)
for _, dev in ipairs(devs) do
log(dev.name, dev.batterylevel)
end