I'am running a script to trigger if the doorbel is pressed, when it's pressed, than
flash some lights for a specific amount of times.
All works wel when they press the doorbel one time, when they press it two time's short after each other (within a sec.)
the light goes on burning constanly and i must switch them off manually.
How to solve this?
Below the script i use.
Code: Select all
return
{
on = {
devices = {'Deurbel Modernizr'}
},
logging =
{
level = domoticz.LOG_ERROR, -- change to LOG_ERROR when ok (was LOG_DEBUG)
},
execute = function(domoticz, item)
if item.state == 'On'
then
domoticz.devices('Overkapping').switchOn().forSec(2).repeatAfterSec(1, 8)
end
end
}
Version: 4.10717
Build Hash: b38b49e5
Compile Date: 2019-05-09 13:04:08
dzVents Version: 2.4.19