Blocky to DzVents Thermo valve
Posted: Thursday 30 April 2020 8:08
Hi Guys,
I'm turning my Blocky events to DzVents since these seem more reliable. I attached my Blocky, I translated it to this DzVents:
Now the log says:
2020-04-30 08:06:33.563 ...s/dzVents/generated_scripts/Thermostaat Klep DzVents.lua:9: 'then' expected near '.'
So I should delete my forEach Should I then write all devices out? Or could I do this on another way?
And maybe have a look if the rest of my script looks fine?
Best regards,
Wouter Lettinga
I'm turning my Blocky events to DzVents since these seem more reliable. I attached my Blocky, I translated it to this DzVents:
Code: Select all
return {
on = {
devices = {'Thermo Level*'}
},
execute = function(dz, item)
if item.state ~= 'Off' then
dz.devices('CV Switch 2').switchOn()
dz.log('CV klep boven open')
elseif item.state == 'Off'.forEach("Thermo Level*") then
dz.devices('CV Switch 2').switchOff()
end
end
}2020-04-30 08:06:33.563 ...s/dzVents/generated_scripts/Thermostaat Klep DzVents.lua:9: 'then' expected near '.'
So I should delete my forEach Should I then write all devices out? Or could I do this on another way?
And maybe have a look if the rest of my script looks fine?
Best regards,
Wouter Lettinga