Rotary encoder dimming

I’ve not used a rotary encoder myself - but I would set the light brightness rather than the PWM output directly.

on_value:
  then:
    - light.turn_on:
        id: led_1
        brightness: !lambda |-
          return x / 255;
1 Like