Hallo,
ich bastel mir gerade einen Zeitplan für die Gartenbeleuchtung zusammen. Vereinfacht gesagt sollen die Lampen von 6:00 bis Sonnenaufgang und von Sonnenuntergang bis 22:00 Uhr laufen. In den Sommermonaten ist das morgens ja nicht sinnvoll. Daher meine Frage: Wie kann ich eine Einschränkung auf best. Monate (in meinem Fall Okt-Mar) vorehmen?
Danke und Gruß!
if (
( fibaro:getGlobalValue("Gartenbeleuchtung") == "Schedule" )
and
( ((currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "06:00") )
or
( ((currentDate.wday == 1 or currentDate.wday == 7) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "07:00") )
)
then
fibaro:call(97, "turnOn");
end