Welcome to Smart Home Forum by FIBARO
Search the Community
Showing results for tags 'timeofday'.
I have a scene that gets the sunrise and sunset for the day. I recently noticed that both sunrise and sunset times are not correct. They are about 30min - 1 hour off from what they should be. has anyone else seen this issue? Does anyone know if fibaro is going to fix it? @T.Konopka
Hallo i need write into one scene more variables, how make this? For example scene for change Time Of Day (Morning, Day, Evening, Night) i need write - for every day when is 05:00 am than "TimeOfDay" = "Morning", when is 08:00 am than "TimeOfDay" = "Day", when is 17:00 than "TimeOfDay" = "Evening" and last when is 22:00 than "TimeOfDay" = "Night" yes it's easy to make 4 scenes for each command separately, but how write into one scene all 4 variables scenes? i have first -- Scene for Morning -- --[[ %% autostart %% properties %% weather %% events %% globals --]] local sourceTrigger = fibaro:getSourceTrigger(); function tempFunc() local currentDate = os.date("*t"); local startSource = fibaro:getSourceTrigger(); if ( ( ((currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "05:00") ) ) then fibaro:setGlobal("TimeOfDay", "Morning"); end setTimeout(tempFunc, 60*1000) end if (sourceTrigger["type"] == "autostart") then tempFunc() else local currentDate = os.date("*t"); local startSource = fibaro:getSourceTrigger(); if ( startSource["type"] == "other" ) then fibaro:setGlobal("TimeOfDay", "Morning"); end end Thank you
Hi there, I got the next setting but it does not work properly can someone explane to me whats wrong? I made a variable "timeOfDay" with 3 options "day" "evening" "night" Then I made three scenes on time: 06h30 set variable to day, 18h30 set variable to evening, 23h30 set variable to night. after this I made a scene to turn on the lights in my livingroom asfollow: If sensor livingroom detects motion check variable equals to evening. and lux value < 35 then turn on lights I only checked the triggering device "motion" so this scene will only run if motion is detected en then checks if all statements are true. somehow this works if I manualy activates the "evening" variable I want this because when I go to the bathroom at night I walk though the livingroom and do not want the lights to turn on. So I guess the problem is not in this scene but in de variable scene that sets the variable on time. Or is this thought al wrong? Where can I see witch state the varibale has at this time and do i need to check the "start when home center 2 starts" box? You can see the attach for more details (it's in Dutch) Thanks in advance. Maurice ***UPDATE*** I got it to work now. 2 things I have changed. First I forgot to check the box "start when home center2 starts" and "do not allow alarm to stop scene while alarm is running" Second I had 3 states the variable could be in, "day, evening, night" I brought this back to 2 states "day and night" Now the scene works like a charm. Good luck.