Enforce Night Lighting

I've found a few threads about night lighting using Motion Lighting Apps and they all look great if I actually had reliable motion sensors setup. For now I want to force dimmers to a fixed 10% after sunset until sunrise unless current value > 10%. Later I'm itching to use motion to trigger different levels based on mode but that's a few months off right now.

If someone enters and hits the dimmer switch to request 100% I want the dimmer to go to 100% and not drop down to 10%. But if they request 0% when they leave I want it to bounce back to the 10% default until sunrise.

The thing I can't seem to wrap my head around is how do I get this sort of rule to run recursively (not just triggered at sunset/sunrise) but also not surprise granny with lights that drop to 10% while she's taking her seat on the throne.

What make of dimmers do you have? The Inovelli's can do what your looking for. Their driver lets you create a child device that will set the local and zwave default levels without changing the current level. It works well.

1 Like

Maybe this app would work for you?

You could use a rule that triggers when dimmer level changes with a condition of <10% and another condition of mode=night.

Thanks for the reply! I'm using Lutron Caseta dimmers throughout. Aside from a minor delay when having to interact with the hub via telnet I find they've been working well. I mean even without the Hubitat they were quite nice but Hubitat is going to allow for some functionality they just don't provide using the stock app.

Thanks for the tip!

It sounds like this is going to be where I'm going to go... thanks neonturbo!

I ran across that before however in the back of my head I was hoping there was an official Hubitat way to do it. That way I don't get lost in a pool of DIY and endless loops. I feel like once or twice before I've backed myself into a laggy hole from having too many janky apps setup.

Regardless, thanks for the link -- off to try it. You rock. Thanks!

If worse comes to worse I suppose... but that'll leave me with a lot of duplicated rules and I'm concerned about endless loops. Will take it into consideration though :slight_smile: thank you EdMcW!

Oops! Looking at this it appears it's got a requirement for a motion sensor trigger. Short from making virtual devices or something I don't know if that'll work the way I'm thinking. Regardless thank you for the suggestion neonturbo!

Here is my very much work-in-progress. This turns my lights on at sunset, off at sunrise, and brings them up to 100% whenever motion is detected, or whenever the physical scene switch is turned on. The key to this one is that the physical scene switch does nothing more than toggle a virtual switch, and that virtual switch position is then evaluated. I have it turning itself "off" after 2 hours so I don't blast the front of the house all night.

There is a boolean I added so that the motion detector doesn't trigger every time the lights dim at the end of the 2 minute delay in the rule.

The only issue I have to work through is getting the motion lighting to properly retrigger immediately following the dim cycle, but I have a feeling that's a combination of timing with the motion reset and the fades. It'll just take 20-30 mins of troubleshooting when I get around to it.

Setup a rule to set the lights to 20% at sunset and off at sunrise. Then add a rule like this:

Well, set them to 10% that should be. :wink:

I have inovelli dimmers and would love to hear how to do this. I have wanted to do this but was never sure how to do this. Would love an explanation from you. Thanks!

In the preferences of the device you want to set the levels for scroll all the way to the bottom and turn the toggle on where it says, "Default Level (Local)". Save the preferences.
Create a rule with either simple automations, or rule machine.
Set your trigger Time of day, when mode changes, lux level etc.
Now the action you want is turn on and set level.
The device to turn on and set level will be the new child device you just created.
So you should have a rule some thing like this
If time is 10:00 pm
Turn on and set level 10%
Bedroom light default local level
Now anytime after 10pm if you hit the Bedroom light swith it will com on at 10%. You can still dim it up and down, but if you turn it off and back on it will come back at 10%
If you have motion detection, or multitap scenes you will have to do do the same with the Default Local Level (zwave).
When you want to go back to "normal" mode, have the Default Local Level child devices turn off. Now the parent switch will return to it's level defaults 0 1-99. At our house, we currently use three rules.

  1. At 10:30pm set level to 1%
  2. At 7:00 am set level to 99%
  3. At 7:45 am set level to 0 (last level)
    This works well for us, but lux level would be better.
1 Like

HUGE thanks for this! I am going to try this right away!