The ESPHome documentation for the “Pulse” light effect describes it this way:
This effect makes a pulsating light. The period can be defined by
update_interval
, the transition length withtransition_length
.
According to the documentation, the transition_length
can be split into on_length
and off_length
, but it does not appear to be split such by default. My assumption upon reading this is that the pulse is supposed to, by default, have a relatively smooth and symmetrical transition between on and off states.
On three separate ESPHome devices connected to LED rings—two Home Assistant Voice PEs, and one custom device using an ESP32 board and a NeoPixel 12-LED ring—I have enabled the “Pulse” light effect, and been surprised by the result: instead of gently fading from off to on, the light sharply spikes on, then fades out.
Sample ESPHome config for the Voice PE:
light:
- id: !extend led_ring
effects:
- pulse:
This is not a high-quality video, in part because the phone camera wanted to automatically adjust for the sudden change in brightness, but I hope it still conveys the transition issue:
If I manually set the transition_length
to 1s
and the update_interval
to 2s
, the behavior persists: again, the LEDs turn on much more aggressively than they fade out:
This behavior is unintuitive to me, and not what I want. I assumed that the pulse effect was supposed to gently pulse in and out, and indeed, that’s what I want to use it for. My naïve reading of the documentation seems to suggest this isn’t intended, but the fact I’ve seen it on three different devices makes me wonder if the problem is between the chair and the keyboard, instead of ESPHome.
So I want to ask directly: is the default “Pulse” light effect in ESPHome intended to have a more aggressive transition when turning lights on than turning them off? If not, is this an error in ESPHome? And if I want to generate a gentle, symmetrical pulsing effect—one whose turn-on transition is as smooth as the turn-off is in these videos—how should I do that?