first commit

This commit is contained in:
Souti
2025-03-06 11:09:58 +01:00
commit 11f7d440ff
330 changed files with 38306 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
local RANDOM_DELAY_MINS = 30
return {
active = true,
on = {
['timer'] = {
'at sunset',
'at 01:00'
}
},
execute = function(domoticz)
if (domoticz.security ~= domoticz.SECURITY_DISARMED) then
local light = domoticz.devices('Window light')
if (not light.bState) then -- i.e. state == 'On'
light.switchOn().withinMin(RANDOM_DELAY_MINS)
else
light.switchOff().withinMin(RANDOM_DELAY_MINS)
end
end
end
}