Code: Select all
if ($d['lawnmower']['s']=='Off'&&past('lawnmower')>7200) {
alert('lawnmower', 'Lawnmower busy for more than '.converttohours(past('lawnmower')), 3600)
}Moderators: leecollings, remb0
Code: Select all
if ($d['lawnmower']['s']=='Off'&&past('lawnmower')>7200) {
alert('lawnmower', 'Lawnmower busy for more than '.converttohours(past('lawnmower')), 3600)
}I don't think this is possible without some scripting.disputes wrote: Thursday 17 October 2019 0:15 When therese been Off received from the switch for more then 2h i will get the notification.
[/size]
Code: Select all
return {
on = { timer = {'every 2 hours at daytime'}},
execute = function(dz)
local lawnMower = dz.devices('lawnMowerSwitch') -- Change to the name of your switch
if lawnMower.state == 'Off' and lawnMower.lastUpdate.minutesAgo > 120 then
dz.notify('Lawnmower alert', 'Where is my lawnmower. Have not seen it in ' .. lawnMower.lastUpdate.minutesAgo .. ' minutes')
end
end
}
Users browsing this forum: No registered users and 1 guest