Is it my script that is the problem or is it a bug?
Code: Select all
local deviceManager = require "telldus.DeviceManager"
local pooltemp = "US Pool" -- Name of the Pool Temp
local pooltempadjusted = "Pool justerad" -- Name of the dummy sensor (must exist!!)
function onSensorValueUpdated()
local device = deviceManager:findByName(pooltemp)
local my_adjusted = deviceManager:findByName(pooltempadjusted)
if device == nil or my_adjusted == nil then
return
end
local Temp = device:sensorValue(1,0)
local Resultat = Temp + 0.1
if (Resultat < 35) and (Resultat > 10) then
my_adjusted:setSensorValue(1, Resultat, 0)
end
end