Thank you for your help. I assume that in your code ~- shoul be as ~=, but with
if it didn't work:
Code: Select all
if ((domoticz.round(myCurrentSetPoint, 1)) ~= (domoticz.round(domoticz.variables('NightTemp').value, 1))) then
Code: Select all
2017-10-31 12:31:00.307 Error: dzVents: Error: An error occured when calling event handler round_test
2017-10-31 12:31:00.307 Error: dzVents: Error: ...z/var/scripts/dzVents/../../dzVents/runtime/Domoticz.lua:243: attempt to perform arithmetic on local 'x' (a nil value)
Writing to log seems working:
Code: Select all
domoticz.log('*** Start night SetPoint: ' .. domoticz.round(myCurrSetPoint, 1) .. 'C -> ' .. domoticz.round(domoticz.variables('devolo1NightTemp').value, 1) .. 'C ***')
Code: Select all
2017-10-31 12:20:00.261 dzVents: Info: *** Start night SetPoint: 20C -> 16C ***