Turn lights on slowly

Hi y'all,

I'm trying to figure out how in rule machine to turn lights on or off slowly. I've found the option that allows me to set a dimmer but it seems like the fastest option is for 1 minute. I'm looking to gradually dim the light to off over the course of 5ish seconds. Turning on, over about 2 seconds would work. How do I do this?

My previous hub referred to it as ramp rate but I don't know where that option is in HE.

Thanks.

Take a look at the "Fade dimmer level over time" action:

I'm not sure what you're trying now, but it sounds like maybe a plain "set dimmer level" action, which just calls the setLevel comand on the device (once) with the appropriate level and transition time parameters. The "...over time" action in Rule Machine sort of fakes longer transitions by repeatedly (based "using this interval") sending these commands using smaller changes (it does the math for you based on your options to figure out how much each time) over a usually longer period of time.

EDIT: Wait, I think I have this backwards. Sounds like this might be what you're trying but you do want the other option.

Sounds like they want it as a device setting, not in a rule.

In the Devices page, under your device, there should be a setting for Dimmer Ramp Rate, Dimmer Duration, Transition Time or similar. Not all devices or drivers support this. Not all inbuilt drivers have this feature, you may need a custom driver.

What device is this?

It's actually two devices.
One is configured as a Generice Zigbee RGBW Light and the other is LIFX Multizone. I'll check for the option to set ramp rate in these devices.

Every time you use the command to set the dimmer level, it lets you specify the transition time for that change to the dimmer. This is available for all built-in drivers. You simply request the dimmer level and enter 5 for the transition time. You don't need to configure the transition time, you can do it with each command. The transition time will be used if this parameter is not send with the level command.

In my previous hub I was able to change device parameters to set the ramp rate for devices. I did find "transition time:" in one of the devices state variables. I just don't know how to change it, there is no option in the Commands section to change the trransition time. Should I take this to mean I can't adjust it?

Thanks for the quick responses.

I've added a note to my post because I think I misread what you wanted. If you're using Rule Machine (or an app in general, though options there may vary) for this, you should be able to achieve what you want:

  • a setLevel(0) (a command you can run on the device page by putting "0" in the first box for "Set Level"--may be useful to play around and see how your device responds to different things) will turn most devices off while "remembering" the previous level. Rule Machine can do this with the "set dimmer level" action, and you can specify how fast/slow you want it do happen. This would call setLevel with two parameters, the desired level and the transition time. I don't know about LIFX, but most Zigbee bulbs will respect transition times from 0 up to ... many seconds (never really tried to find the max myself on any) here. A value of 0 should be either instant or as fast as you can get the bulb to go.
  • Similarly, you can turn the bulb on with the "set dimmer level" action instead of a plain "on," and you can specify the transition time there too.

With most devices/drivers, you're unlikely to find a parameter for on/off transition times (some Z-Wave dimemrs at least do have this, though), and even less likely to find one that lets you specify something different for both. But you can work around it by setting the level, which on almost every device does support a transition time, instead--you'll just mostly have to do that at the app level instead of the device level. One exception is the "Transition time" or "Default transition time" parameter you'll find on lots of devices, like the Zigbee bulb. That supplies the second parameter for setLevel if you don't manually specify a time yourself.

Cool, I'll look around and try some stuff out.

Bump on this. I'm trying to do this as simple as possible. I can't find any "Set Dimmers and Bulbs" and "Fade dimmer level over time" actions:

Do I need to install something additional? @bertabcd1234 I read about the setLevel with 2 parameters, but I've no idea how to hook it up. The UI does not seem to support it. Furthermore Ideally I would like the rule to only brighten/dim the LED only while I'm holding the button. That way I can use it as a dimmer dial to control the full range of brightness.

What app are you using to do this? The above is referring to Rule Machine. I cannot tell from your screenshot.

I'ts the build-in Basic Rules.

Oh now I see. Rule Machine is another build-in app. My bad.