Device stays On after 1 minute
Posted: Wednesday 12 August 2020 23:27
When my PIR is active I want to turn on 2 lights for 1 minute.
Im my script with only Bijkeuken it works.
If I add the Bollamp that I want to color red, the Bollamp stays on. Is there another way to do this?
Thanks,
Peter
Im my script with only Bijkeuken it works.
If I add the Bollamp that I want to color red, the Bollamp stays on. Is there another way to do this?
Thanks,
Peter
Code: Select all
return {
on = {
devices = {
'PIR 1 buiten'
}
},
execute = function(domoticz, device)
myHue = domoticz.devices('Bollamp')
if(device.active) then
if(domoticz.devices('Schemer').state == 'On' and domoticz.devices('Thuis').state == 'On') then
domoticz.devices('Bijkeuken').switchOn().forMin(1)
myHue.setRGB(255, 0, 0).switchOn().forMin(1)
end
end
end
}