Automation 2.0. Lesson 4. Lighting control by time periods

Lesson 3 Automation 2.0. Lesson 3. Controlling lighting devices

Good afternoon, today’s lesson is devoted to creating time conditions for turning on lighting devices.
Often in everyday life, the user wants to have comfortable lighting at a certain time of day. As a rule, it is divided into evening time, night time (sleep), morning time.
Evening and morning are of the same level, sleep is comfortable for the night (light alternate lighting).
Let’s consider an example of a constant lighting period (day or night).
Lesson 3 we completed by creating a comprehensive lighting automation.
Let’s supplement this automation with the “night” activation period, from lesson 2 we will go to the “…” settings and select “Acting time” for the motion sensor and the opening sensor.
Figure 1.

We select the “night” option, I practice choosing the start of the event 15 minutes before sunset and 15 minutes after sunrise. This selection is optimal for my region.
Fig. 2,3,4



As a result, we will get a ready-made automation for the night period. Automatic triggers are a motion sensor and an opening sensor. The wireless button works 24/7 for manual light switching, there are times when you need to turn on the lamp even during the day.
Fig. 5

Now let’s consider my lighting solution by time periods (evening, night, morning).
To understand this solution, I will make an extended explanation.
We will make three different light switchings for different parameters in the “THEN” conditions.

  1. On lamps.
  2. Set the brightness.
  3. Set a static effect (create a cozy light for the night).

You ask, why not “set the brightness” three times, because Aqara has limited the function of performing the same action in “THEN”, I am making a request to @AqaraOfficial regarding this limitation.
We do not limit the switching period “1”.
For the “2” switching period, we choose “night”, similar to the motion and opening sensors.
For the “3” switching period, we choose the time range 23.00-06.00.
We will get such automation in the “THEN” section
Fig. 6

Now I will explain the switching algorithm.
“1” (On without a period) will constantly turn on the lamp state that was after the lamp was turned off (Off). “2” turns on the light at 100% during the “night” period. “3” turns on the light 23.00-06.00. Please note that after 06.00 the light continues to work at “2”-100%.
There is one feature in this automation, when the first switching on occurs in the period 23.00-06.00, 100% is instantly observed and then the entire period the specified (dimmed) lighting.
I use such automation in the bathroom, toilet, corridor, kitchen.
This concludes my current lesson.
The next lesson 5 I will devote to vector control using sensors.
Thank you for reading and sharing the topic (you can also on other platforms with a link to our forum).

11 Likes

I may be of assistance here because of my background.

The Day/Night need a 1 minute offset rule built in when you create the automation. It’s the time overlap that causes the error I believe.

Automation created: Let either the Day or Night have an automatic 1 minute offset to avoid the time overlap error if that’s the cause.

2 Likes

When I used the sliding rule, it was inconvenient to use. 1 second is a long time when turning on the light.

1 Like

1 second would be optimal, but generally this is a quick fix that doesn’t require a ton of re-coding throughout the rest of the app since it bypasses the problem.

Can always go back through and clean it up and cure it totally later on.

1 Like

Hey guys,
How you set these automations with the P2 motion sensor?
The P2 is unfortunately limited in its automations :confused:

1 Like

This is possible with Matter p2

1 Like

I’m currently still using the exact 24 hour time and offsetting by 1 minute myself.

This is an app limitation we are talking about. The app is throwing an exception when time overlaps and the night and day rules aren’t accounting for that.

2 Likes

I am missing the “night” settings where you can set the start time to “sunset” and the end time to “selected time”. Example, start time “15 minutes before sunrise” and end time “23.00”.
Same with sunrise, start time “06.00” and end time “15 minutes after sunrise” (this is just an example).
Maybe the 2.0 developers will read this post and take our suggestion into account, @AqaraOfficial, pass on our request to the 2.0 automation developers.


Do so.

1 Like

That’s a great idea! Thanks God the input @gafich10
But maybe the developer can add some better features! Don’t know what possibilities are available with Matter 1.4

1 Like