Dim light increase every x minute

Is that any easy and nice way to dim increse a light so it in increase 10% every 1 minute.

The easiest way is something like this example which would start at 6am and increase the brightness by 10% every minute:

- alias: Slow turn on
    - platform: time
      at: '06:00:00'
    - light.turn_on
        entity_id: light.my_light
        brightness_pct: 10
    - delay: '00:01'
    - light.turn_on
        entity_id: light.my_light
        brightness_pct: 20
    - delay: '00:01'
    - light.turn_on
        entity_id: light.my_light
        brightness_pct: 30
    - delay: '00:01'

... keep repeating this until you get the brightness you want.

So maybe something like this (I have not got my dim device yet so I can’t try)

I do something similar. I use the built in light brightness transition property which does the smoothest transition. Here’s an example of my 3 year old daughter’s wakeup light where the light will be at full brightness (255) in 900 seconds:

And this is how my flow looks like. I’ve tried it several ways and for some reason this is the way it works. I turn on the light at 1 brightness, delay 5s, and do the transition. If I connect the delay on the top turn on node, it doesn’t work:

1 Like

Nice, nice and simple, like it alot. Going to try that

What happens if you flip the light switch manually during the transition or if you send another command to the light during the transition?

Not sure. :laughing:

Keep in mind that not lights implement the transition: parameter. There’s a pretty lengthy thread about it here:

I ask because the popular GE Z-wave wall switches do not implement the transisitoon: parameter, so the only way to do a slow fade is to do something like in my post above or what I actually ended up doing is through a python script.

I want my bedroom lights to fade-on over 30 min when I have to wake up before sunrise. However, sometimes I wake up before the fade is done or I decide not to get up and shut off the light - so I had to do some special handling that if the light was changed in any way outside the script, the script would abort.

Yes, not all lights might support the transition feature. Note on that thread that @ha_steve linked to, there’s also a reply about using a delay for it to work:

oh, cross posted. See my reply above. That might be the reason.

The delay that is talked about there is part of the z-wave config parameters for the device, so if you wanted to do it that way, you’d have to send z-wave commands to configure the switch, then send them again afterwards to put it back to normal. Otherwise it will keep doing all turn on turn offs slow.

The slowest you can do is 99 steps at 2.55 seconds per step or just over 4 min.

HOWEVER, all of this is moot with the GE switches because… they respond to the brightness: parameter immediately regardless of the delay/step settings. So you can’t specify a brightness and have it “fade” to that, it will immediately jump.

In any case, I would recommend to the OP, if they have the inclination, to do it programmatically as it avoids any limitations of the particular switch/light manufacturer’s implementation

Hmm have a Little problem with the light increase
I have buy a Nexa EYCR-201 (I running 433Mhz Tellstick) and what I have read it have 8 level of the dim.

So if I do 255/8 it give me about 32 so if I do 8 settings of Brightness like 0,32,64,96,128,160,192,255 and a delay about 10 sec, is that a good idea?

I don’t think anyone can answer that for you… just try it.

I did do that you show but it feel that the light go up and down all the time.
LIke my Turn on Schedule is sending ON and ON and ON.

I created a workflow in Node Red that works well and you can set it up as you wish, such as;

  • Set maximum brightness
  • How long it takes from 0% brightness to maximum% brightness
  • With smaller steps the transition goes smoother, with a higher value in steps the transition becomes less smooth

The message (flow) stops when maximum value is reached.


Copy and import:

[{"id":"679982.70cd368","type":"api-call-service","z":"39fbc49a.b7c3dc","name":"","server":"8e9ec046.8c74c","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.achtertuin","data":"{\"brightness\":\"{{count}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":870,"y":945,"wires":[[]]},{"id":"a2a12bec.9bad88","type":"inject","z":"39fbc49a.b7c3dc","name":"Start Trigger","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":265,"y":855,"wires":[["58a8653d.e2420c"]]},{"id":"58a8653d.e2420c","type":"counter","z":"39fbc49a.b7c3dc","name":"Step = % Brightness","init":"0","step":"5","lower":"0","upper":"100","mode":"increment","outputs":"1","x":490,"y":870,"wires":[["570bc7d1.a59968"]]},{"id":"4158e8e7.92cb48","type":"stoptimer","z":"39fbc49a.b7c3dc","duration":"2","units":"Second","payloadtype":"num","payloadval":"0","name":"Transition time also depends on the step value.","x":555,"y":945,"wires":[["58a8653d.e2420c","679982.70cd368"],[]]},{"id":"570bc7d1.a59968","type":"switch","z":"39fbc49a.b7c3dc","name":"Brightess Maximum","property":"count","propertyType":"msg","rules":[{"t":"lte","v":"100","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":720,"y":870,"wires":[["4158e8e7.92cb48"]]},{"id":"6d383a33.5f8274","type":"inject","z":"39fbc49a.b7c3dc","name":"Stop Trigger","topic":"","payload":"STOP","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":265,"y":900,"wires":[["58a8653d.e2420c"]]},{"id":"8e9ec046.8c74c","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]

there is a nice node for it time-fade

@xx_Nexus_xx Thanks for that one. I had seen it, but it seems that it only works with a certain start and end time (given hour:minute) or do I not understand correctly?

There is another Node which can do what you want

1 Like

Great stuff, works. Still not sure if I like it but that has nothing to do with your implementation.

1 Like