Elegant way to simulate a transition?

The following isn’t more compact but can be applied to any light:

You can use the script in an action like this:

action:
  - service: script.light_fader
    data:
      light: light.lidl_e14_weiss
      transition: '00:15:00'

It calculates the optimal dimming interval based on the specified duration length. All credit goes to community member mysnyds. All I did was refactor it.

1 Like