Can anyone help me?

I would like to know how I should do when I want to create a functional counter which could detect when a temp on a termometer reaches the temp x.
Dear
Andreas
Moderator: leecollings
Code: Select all
return {
active = true,
on = {
'MyTempSensor'
},
data = {
temperatures = { history = true, maxItems = 10 }
},
execute = function(domoticz, sensor)
-- add new data
domoticz.data.temperatures.add(sensor.temperature)
-- average
local average = domoticz.data.temperatures.avg()
-- maximum value in the past hour:
local max = domoticz.data.temperatures.maxSince('01:00:00')
end
}
Users browsing this forum: Google [Bot] and 1 guest