Modified kitchen lighting rule for WAF

I want to solve this by myself but can you give me a clue of feasibility ?

I have a set of lutron Caseta, some Samsung motion sensors and I set some simple lighting rules (by example my stairs) to switch on the lights if there is motion after sunset (and shut them down after 2 minutes if there is nobody). Fine

I did the same for my kitchen but for unknown reasons (...) my wife doesn't like that behavior for the kitchen. She likes the lights in the kitchen after sunset...
But I want to keep that rule (for me) but want to try another option:

If she trigger the caseta switch (to open the light, as usual), even the motion sensor triggered the light before her (obviously, she needs to go to the kitchen to push the button), I need a rule that overpass the motion rule.
In other words, if she trigger the caseta switch ON (even the light is already ON), the "motion rule" will NOT shut off the lights after 10 minutes (because nobody is in the kitchen...) and will resume at 00:00 or if she trigger the OFF caseta switch.

I'm not presently at ease with those rules to manage this strange rule without your help.

*EDIT: I found the inverse: don't turn ON if manually turned OFF. I need more keep ON if manually turn ON

Thank you !
dont%20turn%20on%20if%20manually

I'm a bit confused by what exactly you're looking for. but the "inverse" to what you found is the next tab on the main screen shown here.

which brings up

6

I think the issue here is that "Don't turn off if already on" won't work because the motion sensor will turn on the lights before she gets to the switch to actually press the "On" button.

I don't have any Cas├ęta dimmers/switches on Hubitat, but do button presses on them register as button events in in Hubitat (in addition to regular on/off and dimming messages)? If so, one idea you could use is the "Buttons to disable off" (use button 1 or whatever the physical "on" button registers as) and "Buttons to enable turning on/off" (use button 4 or whatever the physical "off" button registers as) features. This depends on the Cas├ęta generating button events, however, which I'm not sure it does. (A Pico remote would definitely do this--on the 5-button, it would be buttons 1 and 5 that you want. Any button device really could, and so could a virtual [or real] switch if you find a way to get one turned on/off.)

No, but a workaround could be to use ML to set the dimmer level to 99%. The physical "on" press at the Caseta dimmer sets the dimmer level to 100%. Could have a rule that says when dimmer level = 100, press a virtual button. Then have that virtual button disable off in ML. Difference between 99 and 100 should be imperceptible to anyone in the room.

3 Likes

hmmm, sounds interesting. I like the idea. will dig into it. thx

I made this. Probably not the most optimized rule (else if needed ?) but it seems to work:

If MS activated, switch on for 10 min
if caseta dimmer switched ON then keep the light ON ("forever")
if caseta dimmer switched OFF then switch off the light and re-enable the motion sensor

what do you think of this ?

1 Like

You may need some "cancel rule timer" actions in there, otherwise looks good.

Do you really want the lights to turn off 10 minutes after motion is active? It's far more likely you want them to turn off some period of time after motion goes inactive. The Rule 4.0 docs contain an example of this (though you'd of course need to add the rest of your rule in). Even if you do, your existing rule won't cancel previously scheduled delays/offs: it keeps each and every one from every "active" event and will run them all even if motion becomes inactive then active again later, so the above advice (Also something you'll see in the docs examples) is probably worth following.

I can provide an example if needed.

1 Like

Maybe 2 min could be enough (just passing through to the fridge).
it was my first try on this but gave me a "better" idea for my other lights.
Like in my stairs, the MS is made to put some light for 2 minutes but when I work there, the Caseta ON button could disable the MS until I push the Caseta OFF. Same for my garage or my desk. If I'm there for a long time, MS could be an annoying feature.
Thx for the help, I'll try some modified rules and see what happend.
If I'm lost, I'll ask for further help for sure.
M.

Here's my attempt, haven't tested but this is where I'd start if it was me.

1 Like

I didn't mean 2 minutes versus 10 minutes; I meant that it's quite likely you want to the lights off some period of time (2 or 10 doesn't matter) after motion goes inactive, not some period of time after motion first becomes active (which is what your rule would do). The latter will turn the lights off after 10 minutes even if you're still in the room causing motion.

The above provides one solution to the problem: note that the inner IF tests for motion activity, and the inner ELSE is what will run when motion becomes inactive (the logical opposite of "motion active"). I haven't thought of every possible scenario but a quick lookthrough looks good to me.

Good luck!

1 Like

Thx. ll review both of your explanations.
In fact, I set 10 minutes at first because I put that time in my desk because I stay there "without moving" in front of my MS and the rule switched off my dimmer too often.
But I like the idea of a short time for my MS (99%), except if I switch ON (100%) my dimmer and the rule will then pause/avoid the MS triggering. I need to dig on that for sure.
Will redo a new rule based on your examples.

1 Like