Help with first rule for motion light

Hello,I am trying to my my first motion light rule, but cannot seem to make it work.
I have Sonoff motion sensor and Sengled bulb scene in my bathroom. Can somebody please help me describe how my Rule should look to accomplish the below please?

Day

  • If motion activated
  • and if it is >5 am and < 10:30 pm then
  • (scenario 1) turn on scene A (bulbs at 100%)
  • if no motion for more than 5 mins then turn off scene

Night

  • if between 10:31 pm to 4:59 am
  • (scenario 2) if there is motion turn on scene B (bulbs at 20%)
  • (scenario 3) if no motion for 5 mins, turn on scene C (bulbs at 5% to act as night light)

Should i be combining above 3 scenarios in 1 rule? or better keep day vs night separate rules for better troubleshooting? OR, instead of rule machine, should I be using "Motion and Mode lighting app"

To some extent, this is a matter of preference, but if you're not sure how to write a rule to do what you want above, the Motion Lighting app is where I would start. It's also a smaller app and will likely execute a tad bit faster, though for all practical purposes (even with potentially time-sensitive automations like this one), it probably won't matter. It has options for lots of things and should be able to handle what you want above.

If you run into something you can't do there, you could certainly consider a rule. This requires you to create all the logic yourself (built-in apps like Motion Lighting usually do this work for you--just choose some options, and you're good to go). This means you need to think like a computer, since it will only do exactly what you say. In your second case, for example, nothing would turn the light off as written. :slight_smile: Perhaps that is intentional; if not, then it's something to consider.

Thanks for the response. You are correct about my second condition (scenario 3) that lights will not turn off. That is intentional, as I wanted to use that condition as a night light, but only while nobody is in the bathroom. If somebody enters the bathroom at night, i want to slightly increase the brightness.

I will give the motion app a try to begin with.

I have created the below two motion light apps. Will test it with family over the next few days.

Day

Night

1 Like

I would not use two Motion Lighting apps for the same room. Here is another example you may find helpful, as it uses per mode dimming levels and off delays.

1 Like

The only reason I thought of having to apps is that in the night mode, I want that when there is no motion, then the nights should turn on a scene to create "night light". During day though, no motion should mean the bulbs completely turn off. Anyway you think I can accomplish that from a single app ?

1 Like

I would simply have an automation that turns on the night light at a certain time, and off at a certain time. Keep that separate from the main motion lighting automation.