I want to have all of my lights have the same light levels based off of the time of day (modes). Currently, I have a single rule that says during Day mode, set level to 100. During Night mode, set level to 1, etc. The issue is that the lights come on every mode change. I have rectified this by saying that they turn off 1s after each mode change. Now every mode change they will come on for 50ms and then turn back off. The problem there is that if it was on prior to the rule change, it will also turn off with all the rest which is annoying when you want a light on, but just to get more dim.
What is the easiest and best way to implement a rule that sets the light level for each mode, doesn't turn the light on to change the mode (or just flickers it quickly if it must), and if the light is currently on, keep it on after the level change. I want to do this for every light, so basically 10 identical rules.
Circadian Daylight has a brightness-throughout-the-day option that you might be interested in. It applies changes when a dimmer/bulb gets reported as powered on. Very smooth transitions, too. I have an option in there for custom max/min brightness, too, but it's not wired up yet. I should get around to that this weekend...
For rule machine, I'm not sure I'd have a cleaner solution aside from using a capture-restore (power-state only) rule to determine that state prior to sending the command.
Have you looked at the stock Motion Lighting and Mode Lighting apps (both under Motion Lighting)? I'm not sure if either can handle exactly what you're doing right now, but if you wanted to trigger specific lighting per mode based on motion, button presses, or mode change, they can help. I can't remember all of the options so it's possible you'll run into specific cases this can't handle, like not changing lights that aren't currently on while changing lights that are.
However, it sounds like you might also be able to make what you have now work with RM with just minor modifications. You might be able to do it in a single rule with complex logic, but it would certainly be easy to just separate what you have now into two rules, each with one additional condition that checks whether the lights are currently on (or off) and proceeds in the Actions section accordingly. This will make ones that are off flicker on for a second since there's no way to "preset" level or color temperature, but it would allow you to skip the "off" action if you test for the bulbs being on first. You did say you were OK with that, and it's definitely an easy route, so maybe this is an acceptable price.
So I gave that a try and I can't seem to get it to work properly. I set up my lights as dimmers and put in my modes and my lights aren't changing dim state at all during the day.
Maybe I can add a feature that would be more beneficial.... would you like an option for:
set static brightness for each mode
Right now, the brightness should just rotate between a minimum (after sunset/before sunrise) and up to a maximum when the sun is up, but I can absolutely see the validity of a brightness when this mode setting
I think that would be nice, and that would match what I was trying to achieve with my previous rules. Matching the sunlight would work for me too. I just wasn't able to get that to work. My lights stayed at 100% no matter what time of the day.
Yeah, like that with no quotes. Ill try removing that and see if it changes. I will also try to get you screen shots of the whole app and how I have it set up tonight.
That feature is working wellāwhen you turn on a switch, within a second or two it will dim to the appropriate level depending on the mode.
Would you like the aggressive-brightness-change feature that you currently have, where the lights turn on, change brightness, then turn off? Or is the behavior above acceptable to you?
I created a rule trigger that fires when the light is on and/or the mode changes to set the level and color depending on hub mode. No need to set it otherwise unless it's on.
This should do it and it's built in. So support directly from HE. This is how I change mine. The ONLY gripe I have is that it's an abrupt change. It would be nice to have a fade. But I'm not going to complain. It works.