Light dims from previous brightness when turned on

I’ve configured a basic monochromatic LED like this:

  - platform: esp8266_pwm
    pin: GPIO5 #D1
    id: pwm_output_d1

  - platform: monochromatic
    name: "ESP Test Light"
    id: light_1
    output: pwm_output_d1

In Home Assistant, I do the following:

  1. Turn on the LED and set it to full brightness
  2. Turn off the LED
  3. Drag the slider up to a really low value (which turns on the LED and sets the brightness)

This has the effect of turning on the LED at the previous full brightness level, then fading the LED down to the new low value. This is an undesirable transition, particularly when its dark when I don’t want to be dazzled, if I happen to have turned off the lights when they were at a high brightness.

I’ve reproduced this with both the API and MQTT connectivity, on both a Wemos D1 and a H801 board.

Is this a known issue, as I’ve failed to find any previous reference to it, yet seems a fairly trivial expectation that the lights fade up from 0, if you turn them on whilst setting a brightness level.




How about sending light.turn_on with brightness 1 prior to sending light.turn_off command (and perhaps add a delay between the two)? This can easily be set inside a script and have an automation call the script.

Then, for turning on the lights, it will use brightness 1 and then turn to desired brightness.

Thanks for the suggestion - that works really well and provides the desired effect I’m looking for!

I’m just surprised it is not the standard behaviour - it doesn’t feel intuitive to have to write extra logic to put the lights into a state before turning them off.

1 Like