timer trigger
Posted: Thursday 22 March 2018 23:24
hello i did simple script that shoud write to log, when is some device on or off at specific time
but only START TEST is displayed on log
tried few things but cant figure out what could be wrong
thanks
when i add code to report state
in log is: dzVents: !Info: On
but only START TEST is displayed on log
tried few things but cant figure out what could be wrong
thanks
Code: Select all
return {
active = true,
on = {
timer = {'at 23:09'}
},
execute = function(domoticz)
domoticz.log('START_TEST', domoticz.LOG_FORCE)
if (domoticz.devices(472).state == 'on') then
domoticz.log('on', domoticz.LOG_FORCE)
elseif (domoticz.devices(472).state == 'off') then
domoticz.log('off', domoticz.LOG_FORCE)
end
end
}
Code: Select all
domoticz.log(domoticz.devices(472).state, domoticz.LOG_FORCE)