Zazze wrote: ↑Sunday 09 August 2020 12:13
Anyone that can point me in the right direction on how to do it correctly?
You cannot do this in domoticz Blockly (see the mouseover helptext below)

- Blockly helptext.png (19.39 KiB) Viewed 725 times
Using dzVents it could look like below
When not yet familiar with dzVents please start with reading
Get started Before implementing (~ 5 minutes). Special attention please for "In Domoticz go to Setup > Settings > Other and in the section EventSystem make sure the checkbox 'dzVents enabled' is checked. Also make sure that in the Security section in the settings you allow 127.0.0.1 to not need a password. dzVents uses that port to send certain commands to Domoticz. Finally make sure you have set your current location in Setup > Settings > System > Location, otherwise there is no way to determine nighttime/daytime state."
Code: Select all
return
{
on =
{
devices =
{
'UTE Temp',
'Ute Zigbee',
},
},
logging =
{
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 Temp').temperature
local ute2 = dz.devices('Ute Zigbee').temperature
local minCombined = dz.devices('UTE_KOMBINERAD')
minCombined.updateTemperature(math.min(ute1,ute2))
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>>
dzVents wiki