im very new to LUA and DzVents.
I have a bit of trouble to undersand why the following Script is not working:
Code: Select all
return {
on = {
devices = {
'Test Heizung' -- a dummy switch
},
variables = {
TH = 'Test Heizung'
},
},
execute = function(domoticz, TH)
local Setpoint = domoticz.devices('Setpoint') -- a Setpoint
if(TH == 'On') then
Setpoint.updateSetPoint(16) -- Setpoint should be 16°C when switch = on
end
domoticz.log(Setpoint.setPoint) -- Log the new setPoint
end
}
Log output is:
Code: Select all
2018-11-27 08:03:48.903 Status: User: admin initiated a switch command (48/Test Heizung/On)
2018-11-27 08:03:49.044 Status: dzVents: Info: Handling events for: "Test Heizung", value: "On"
2018-11-27 08:03:49.045 Status: dzVents: Info: ------ Start internal script: Heizungscript: Device: "Test Heizung (Switches)", Index: 48
2018-11-27 08:03:49.045 Status: dzVents: Info: 19
2018-11-27 08:03:49.045 Status: dzVents: Info: ------ Finished Heizungscript
Thanks
