Repeat until automation was working until a few days ago

doing this i a tight loop i typically meta stable. this is because the call to change the brightness on a light is typically not synchronous (ie, it’ll return before the ligtht actually changes brightness)… and it might or might not queue up your requests. if it does queue up the request, what will it do when you’ve overloaded the queue?

it’s not uncommon for this tight loop approach to work for a while, then when timings change (due to an update, or other things happening) it may suddenly break.

the best way to do this is if your light natively supports transitions…

service: light.turn_on
target:
  entity_id: light.your light
data:
  transition: 25
  brightness: 0

or alternatively use @handcoding 's nifty light fader:

which does the fading for you with all sorts of options and works with lights that do and don’t natively transition.

1 Like