Playing with dzVent and Table
Posted: Monday 14 November 2022 15:48
I thought moving from python3 to dzVent table would be easy, but looks not
Here after is the script I'm trying to build
and here after the output like nothing found in the for loop
Here after is the script I'm trying to build
Code: Select all
local SCRIPT_NAME = 'testing'
return {
on = {
timer = { 'every 1 minutes' }
},
logging =
{
level = domoticz.LOG_INFO,
marker = SCRIPT_NAME,
},
execute = function(dz, item)
local thermostats = {
["Salon"] = 'BT Salon ThermoSetpoint',
["SM1"] = 'BT SM1 ThermoSetpoint',
["SM2"] = 'BT SM2 ThermoSetpoint'
}
for key, value in ipairs(thermostats) do
dz.log( 'key: ' .. key .. ' value: ' .. value )
end
end
}
and here after the output like nothing found in the for loop
Nov 14 15:19:00 pi3 domoticz[19041]: 2022-11-14 15:19:00.760 Status: dzVents: Info: testing: ------ Start external script: Testing-script.lua:, trigger: "every 1 minutes"
Nov 14 15:19:00 pi3 domoticz[19041]: 2022-11-14 15:19:00.761 Status: dzVents: Info: testing: ------ Finished Testing-script.lua