esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 35 forks source link

Jittery transition when turning on/off partition-joined lights #5880

Open manzato opened 4 months ago

manzato commented 4 months ago

The problem

Hi, I have two LED strip lights which are controlled by a PWM and an external power supply each. I want to expose them as a single light to the UI, for which I combined them using a light partition. If I turn on/off each light independently, the on/off transition effect (default) works perfectly (slowly increases/decreases the brightness). If I turn on/off the combined light, that transition is jittery / erratic. Trying to debug this, I created (outside of ESPHome, in HA) a helper grouping both individual lights as a single one, and if I turn on/off that light, the transition is smooth, same as when using the lights individually. Based on that I assume that the problem is in the partition component not dealing well with the transitions, but that's just my hunch.

Which version of ESPHome has the issue?

2024.5.4

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.5.5

What platform are you using?

ESP8266

Board

d1_mini

Component causing the issue

Light Partition

Example YAML snippet

esphome:
  name: led_light

esp8266:
  board: d1_mini

output:
  - platform: esp8266_pwm
    frequency: 100Hz
    pin: D2
    id: pwm_right
    power_supply: right_power_supply

  - platform: esp8266_pwm
    frequency: 100Hz
    pin: D1
    id: pwm_left
    power_supply: left_power_supply

power_supply:
  - id: 'right_power_supply'
    pin: D6
    keep_on_time: 
      milliseconds: 100

  - id: 'left_power_supply'
    pin: D5
    keep_on_time: 
      milliseconds: 100

light:
  - platform: monochromatic
    id: 'right_living_light'
    output: pwm_right
    name: "Right"

  - platform: monochromatic
    id: 'left_living_light'
    output: pwm_left
    name: "Left"

  - platform: partition
    name: "Combined"
    id: combined_light
    segments:
      - single_light_id: left_living_light
      - single_light_id: right_living_light

binary_sensor:
  - platform: gpio
    name: "Light switch"
    pin:
      number: D7
      mode:
        input: True
        pullup: True
    filters:
      - delayed_on_off: 20ms

    on_state: 
      then:
        - light.toggle: 'combined_light'

Anything in the logs that might be useful for us?

No response

Additional information

No response

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.