Set a data value which has no value! Stumped
Posted: Sunday 05 May 2024 17:58
So this is what I wrote
and this is the debug
But I set the initial value to 10!
Any ideas where my error is are welcome.
Code: Select all
return {
active = true,
logging = {
level = domoticz.LOG_DEBUG,
marker = 'Solar Shade'
},
on = {
timer = {'Every minute'}
},
data = {
eastsolarblindsmoved = {initial=10}
},
execute = function(domoticz)
domoticz.log('log marker ==============')
if (eastsolarblindsmoved~=nil) then
local texttest
texttest=tonumber(eastsolarblindsmoved)
domoticz.log('east solar blinks moved value ' .. texttest)
else
domoticz.log('not a value.... ' .. 'no value texttest')
end
end
}
Code: Select all
2024-05-05 17:53:00.482 Status: dzVents: Info: Solar Shade: log marker ==============
2024-05-05 17:53:00.482 Status: dzVents: Info: Solar Shade: not a value.... no value texttest
Any ideas where my error is are welcome.