So I am having two door sensors deur1 and deur2, when I create a script to notify on door open it works fine when triggered by a device. Now I changed script to be triggered by deur* and it is now sending out notifications now and then even when there was no trigger of any of the devices. This is awkward as both deur1 and deur2 have not been triggered since yesterday
Anyone an suggestion what this could be
2018-02-25 12:32:02.905 dzVents: deur script
2018-02-25 12:32:02.906 dzVents: deur open-3
2018-02-25 12:32:02.910 dzVents: deur script
2018-02-25 12:32:02.910 dzVents: deur open-3
It works fine when only using deur1 and deur2 as device triggers but not when I use deur* in the script.
I thought I check my device listings on "deur" and noticed there is also "Voltage - deur1" and "Voltage - deur2" and when there is an update on the voltage the script is triggered. To me this seems to be in error as the trigger is deur* and not *deur*.
Should this be reported as a bug?
This is the script:
- Spoiler: show
-
return {
on = {
devices = {
'deur1','deur2','deur*'
}
},
execute = function(domoticz, device)
local now = domoticz.time -- current time
print("deur script")
if now.hour <= 7 and now.wday ~= 1 then
print("deur open-1")
end
if now.hour >= 22 and now.wday ~= 1 then
print("deur open-2")
end
if now.wday == 1 then
print("deur open-3")
end
end
}