The script as it is now works fine,
but there is no check if all values are at a normal level
The 'Humidity sensor 'Garagekamer' is an aqara humidity sensor.
The 'Ventilator wasdroger' is an kaku switch (433.90Mhz)
The script should turn on the 'Ventilator wasdroger' when the temp is above 25 degrees or the humidity is above 55%.
Whichever comes first
Switch off again when the temp drops below 25 degrees or below 55% moisture.
Whichever comes first
Is this possible?
This is mij script now
Code: Select all
return
{
on =
{
devices =
{
'Humidity sensor Garagekamer'
}
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'Ventilator wasdroger',
},
execute = function(dz, device)
local fan = dz.devices('Ventilator wasdroger')
if (device.name == 'Humidity sensor Garagekamer' and device.temperature >= 25) then
fan.switchOn()
fan.switchOff().afterMin(120)
end
end
}Fredom