Im playing around to let my other dzVent script work. Im getting smarter and smarter but need some help.
When temperature outside (info from DarkSky) above 16 degrees then set NEST to 10 degrees.
When i remove the line with DS THB Device i can change NEST higher then 16 degrees and it will update back to 10.
But when i use the DS THB device nothing change. I think i do something wrong but can't find it.
I read the dzVent documents and at the line with "Temperature, Humidity, Barometer sensor" i see the "temperature: Number" line.
My idea i can use this as "temperature > 16" when temperature is higher then 16 degrees.
Can someone tell me how to do this
Thank !!
Code: Select all
return {
active = true,
on = {
devices = {
'DS THB',
'Thermostaat'
}
},
execute = function(domoticz, device)
-- ALWAYS ----
-- OUTSIDE ABOVE 16 DEGREES
if
domoticz.devices('Full Manual Modus').state == 'Off' and
domoticz.devices('DS THB').temperature > 16 and
domoticz.devices('Thermostaat').setPoint > 16
then
domoticz.variables('lagerdan16graden').set(0)
domoticz.variables('hogerdan16graden').set(1)
domoticz.devices('Thermostaat').updateSetPoint(10)
domoticz.log('--------------------==<[TEMP ABOVE 16 NEST TO 10]>==--------------------', domoticz.LOG_FORCE)
end
end
}