Set Dimmer without turning on light

I swear, I'm so low on knowledge on this stuff I never thought I'd create something that would find a bug. Blind luck I guess. LOL

Fixed. Will be in the next release.

Thanks Bruce!

The way I handle this is with variables, have a variable in the background that contains the value at which you would like the dimmer to turn on. (This value can of course be changed by anything in rm) then when the dimmer turns on, have it's level set to the variable instead of to any number in particular. As long as the variable is set correctly your dimmer will always turn on at the desired level.

Can you please share how you set the dimmer to the value of the variable? I am trying to do this and failing miserably due to my lack of understanding what the software wants me to select to achieve this.

Thanks,
Jon

1 Like

I was interested in this too, I found this in the RM4 docs

Global Variables Can Be Used for Level/Color

Global variables can be used in actions that set dimmer or bulb levels, color temperature, or hue/saturation values. To use a variable in this way, include it with %global-variable-name%. In each case only a "Number" global variable is allowed, and it is not range checked

I read this, too. I can't figure out how to set the dimmer I am turning on to the value of the variable. Not sure which options to choose in RM4 when making my rule for the light to set the correct level.

Thanks,
Jon

create a global variable of type Number, mine is named dimmer

then my rule looks like this

Setting the level for most dimmers will also turn on the light. Unless the light allows for Level Prestaging (Sengled native hubitat drivers) or a Default Level setting (GE Motion Dimmer or Leviton Dimmers) the load is going to be turned on when you set the level to the light. That's just the way the firmware works. There's no way to get around it with variables or anything else.

1 Like

This is true in a sense, but what I was saying is when the condition arises where you want to change the turn on value of the dimmer you don't change the dimmer level at all, instead you change the value of a variable, then when you turn on the dimmer you turn it on at the level of the variable, thus every dimmer turn on is to the desired level. Because you never set the value of the dimmer unless you want the light on (only the value of the variable) the light won't turn on inappropriately.

Here's an action in a rule I have all you have to do is put %variablename% as the level you want to set the dimmer to. You'll also need a different rule which sets the variable in the conditions at which you want the dimmer to start turning on at a different level

It doesn't work that way. When you turn on most dimmers they will immediately ramp to their last set value. Only dimmers with prestaging or default values will not do this. All setting your variable does is lower the light after its turned on. So, if your variable is 10 but the light was last on at 100, the light will come on to 100 then dim to 10. There's no avoiding that.

Sure I guess it's just a difference in interpretation of the question, I thought what he wanted was to have the level become the relevant value when he turns it on, not necessarily at the same instant, but in general

It doesn't help you to store that value in a variable vs set it directly in the rule.

Except for the fact that variables can interact with other rules, yes. With a variable you can have any condition you want affect the dimmer outcome by having the variable changed without ever actually setting the dimmer.

But when you set the dimmer it's still going to ramp to 100% if that was the last level it was at and that's the way the firmware works. You get the same benefit of variables that you would otherwise. Using a variable doesn't get you anything that you didn't before.

It'll turn on at the previous level, but ramp to the level you want, that's the point. The variable allows you to set what the dimmer ramps to (which is the ultimate level of the lights) from other rules with other conditions. Like say a rule that runs at 8:30 and sets the variable to 15, and another rule that runs at sunrise and sets it at some other value. And a third rule that runs when you go to the bathroom or whatever you want.

A lot of feedback here. It seems the Rule I setup initially (posted at the top) should run properly, but as Bruce mentioned, there's a bug in the trigger that will be resolved in the next update. As a noob, it'seems to be a pretty straightforward/easy rule, just the bug is keeping it from turning off.

I agree with @promotiondummy. I have a rule that sets my kitchen lights dimmer level based on a lux value that's calculated by a different rule. The calculated lux value is used in several rules for different actions.

The kitchen lights are Hue BR30 White Ambience bulbs attached to a Hue Bridge and integrated with HE via the Hue Bridge Integration app.

Let's say the kitchen lights were turned on at 100% and then turned off. Then the lux value is set to 60%. When the lights are turned on again via the kitchen lights rule (Dim: Kitchen: %setLuxPercent%), the lights will dim up to 60%. Then don't turn on at 100% and then dim down -- or at least if they do so it's fast enough that I can't see it, which is good enough for me.

That's because you're not turning them on physically but with a rule. A digital change will ramp to the rate that you program it to. When you physically turn on a switch it is going to be set to the last level it was set to.

Listen, you can either accept this or not but when you turn on a dimmer physically, it is going to turn on to the last level that it was set to unless the firmware allows you to set a default level (or its a Caseta which always ramp to 100%). That's just the way that they work. You can quickly change the level after it is turned on but nothing is going to be instant.

1 Like