Qouad WallMote
Posted: Friday 06 September 2024 18:46
I created a script, which has a trigger as a device. Now I want the Wallmote to turn off after 1 sec. If I give a direct off command in the script , when that Wall mote turns on, a 2nd script is not executed !
De reset:
And the 2 the script , which needs to be started:
Renaming the switch to a simple one also fails me for Zld2, but that's another concern
The 2nd script , the time should be 20 minutes, but this is for testing
Hopefully someone can point the way
Peter
De reset:
Code: Select all
return {
on = {
devices = {
'Badk_1_Switch'
}
},
execute = function(domoticz, device)
local Bdk1 = domoticz.devices('Badk_1_Switch') -- De Wallmote switch 1
if Bdk1.state == 'On' then
domoticz.devices('Badk_1_Switch').switchOn.forSec(2)
end
end
}
Code: Select all
return {
on = {
timer = {
'every minute', -- causes the script to be called every minute
}
},
execute = function(domoticz, timer)
local Bdk1 = domoticz.devices('Badk_1_Switch') -- De Wallmote switch 1
local Zld2 = domoticz.devices('Zolder_CV-Q2') -- De Ketel
if Bdk1.state == 'On' then
domoticz.devices('Zolder_CV-Q2').switchOn().forMin(2)
end
end
}
The 2nd script , the time should be 20 minutes, but this is for testing
Hopefully someone can point the way
Peter