I've a few scripts that use a .afterMin(). For some reason however this isn't working.
Example; I have the following script:
Code: Select all
--*------------------------------------------------------------------------------------*--
--Creator: Rob
--Date: 08-10-2019
--Last update: 16-10-2019
--Changelog: Added devices to trigger. Changed function segment. isTimer nog longer used
--Source: -
--Description: Turn on/off heating depending if someone is home or not
--*------------------------------------------------------------------------------------*--
return {
on = {
devices = {
[78] = { 'between 07:00 and 19:30' } --Trigger is iemand thuis tussen tijd
}
},
--Voeg logging toe voor dit script
logging = {
level = domoticz.LOG_INFO,
marker = "Thermostaat automatisch"
},
execute = function(domoticz, device, item)
--Declarations
local Thuis = domoticz.devices(78) --Is er iemand thuis
local Toon = domoticz.devices(116) -- Toon Programma's
--Function
if(Thuis.active) then
Toon.cancelQueuedCommands()
Toon.switchSelector(30)
domoticz.log('Toon is automatisch ingesteld op programma Thuis via dzVents')
domoticz.notify('Thermostaat automatisch', 'Er is iemand thuis. De thermostaat is automatisch op het programma Thuis ingesteld.', 'domoticz.PRIORITY_LOW')
else
Toon.switchSelector(10).afterMin(30)
domoticz.log('Toon is automatisch ingesteld op programma Weg via dzVents')
domoticz.notify('Thermostaat automatisch', 'Er is niemand thuis. De thermostaat is automatisch op het programma Weg ingesteld.', 'domoticz.PRIORITY_LOW')
end
end
}
Anyone got a fix for this?
Perhaps useful: I'm running Domoticz on my Synology with a package from Jdahl.