Code: Select all
return
{
on =
{
devices =
{
'Ute Entre',
'Ute Zigbee',
},
},
logging =
{
level = domoticz.LOG_ERROR, -- Change to domoticz.LOG_ERROR when script is OK
--level = domoticz.LOG_DEBUG, -- Change to domoticz.LOG_ERROR when script is OK
marker = 'get min temperature',
},
execute = function(dz)
local ute1 = dz.devices('Ute Entre').temperature
local ute2 = dz.devices('Ute Zigbee').temperature
local minCombined = dz.devices('UTE_KOMBINERAD')
minCombined.updateTemperature(dz.utils.round(math.min(ute1,ute2), 1))
end
}