I wrote this automation in Dzvent I would like a helping hand because I think I was wrong I would like the notification of my motion sensor to be sent only when the previous ON state was 10 mins ago
Code: Select all
return {
on = { devices = { ["Capteur BAT"] = {'at 8:00-20:00'} }
},
execute = function(domoticz, item )
if item.state == "On" and domoticz.devices("Capteur BAT").lastUpdate.minutesAgo >10 then
os.execute("curl -u XXXXX:XXXXX -s -o /dev/null 2>&1 'http://XXXXXX:7080/send.html?smsto=XXXXXXXXX&smsbody=Courier+dans+la+bo%C3%AEte+au+lettre&smstype=sms'")
end
end
}