|
return {
|
|
on = {
|
|
timer = {
|
|
'10 minutes after sunset', -- Time at which roller blinds should go down
|
|
'10 minutes after sunrise on mon, tue, wed, thu, fri', -- Time at which roller blinds should go up
|
|
'at 08:00 on sat, sun' -- Time at which roller blinds should go up on weekends
|
|
}
|
|
},
|
|
|
|
execute = function(domoticz, item)
|
|
if (domoticz.time.isNightTime and not domoticz.time.matchesRule('at 08:00 on sat, sun')) then
|
|
domoticz.log('Es ist Nacht, Rollladen runter.')
|
|
if (domoticz.devices('Tuer_Balkon').state == 'Locked') then
|
|
domoticz.scenes('Rollladen_Nacht').switchOn()
|
|
else
|
|
domoticz.scenes('Rollladen_Nacht_ohne_Balkon').switchOn()
|
|
end
|
|
domoticz.devices('Rollladen_Eltern').dimTo(60).afterMin(2) -- Correct the position of the roller blinds in the bedroom.
|
|
elseif ((domoticz.time.isDayTime or domoticz.time.matchesRule('at 08:00 on sat, sun')) and domoticz.devices('LazyDay').state == 'Off') then
|
|
domoticz.log('Es ist Tag, Rollladen hoch.')
|
|
domoticz.scenes('Rollladen_Tag').switchOn()
|
|
end
|
|
end
|
|
}
|