Several monochromatic ledc lights

Good day,
I’m not very experienced in esp home and I don’t know how to deal with this problem anymore.
I need several led lights that will shine with different effects.
When I have entered in esp32 one monochromatic ledc light with an effect, it works correctly.
As soon as I add the second light the first one stops working and the second one works.
I’ve tried entering different channels for both lights to no avail.
Anyone have an idea how to fix this?

Share your attempted config.

output:
  - platform: ledc
    id: led_stav
    pin: GPIO17
    inverted: True
    channel: 12
    
  - platform: ledc
    id: led_red
    pin: GPIO21
    inverted: True
    channel: 0    
 
# stavová led tlačítka start
light:
  - platform: monochromatic
    id: led_tlacitko
    name: ${unit_name}_led tlacitko
    output: led_stav
    
  - platform: monochromatic
    id: led_zpet
    name: ${unit_name}_led zpet
    output: led_red  

    effects:
      - pulse:
          name: ${unit_name}_brusle
          transition_length: 150ms
          update_interval: 150ms
      - pulse:
          name: ${unit_name}_pripraven
          transition_length: 1s
          update_interval: 2s
      - pulse:
          name: ${unit_name}_servis
          transition_length: 100ms
          update_interval: 500ms      

Thanks. Config looks ok.

The first one stops working altogether or just has no effects?

If it stops working altogether, double check your wiring and if all good open an issue here: Issues · esphome/issues · GitHub

It’s not wiring, I’m testing it on the circuit board. Just delete (disable) the lines for the second light in the config and the first light will start flashing again, as it should.

Right so even though you did not actually answer my question I can guess you need to do this:

light:
  - platform: monochromatic
    id: led_tlacitko
    name: ${unit_name}_led tlacitko
    output: led_stav
    effects:
      - pulse:
          name: ${unit_name}_brusle
          transition_length: 150ms
          update_interval: 150ms
      - pulse:
          name: ${unit_name}_pripraven
          transition_length: 1s
          update_interval: 2s
      - pulse:
          name: ${unit_name}_servis
          transition_length: 100ms
          update_interval: 500ms      

  - platform: monochromatic
    id: led_zpet
    name: ${unit_name}_led zpet
    output: led_red  
    effects:
      - pulse:
          name: ${unit_name}_brusle
          transition_length: 150ms
          update_interval: 150ms
      - pulse:
          name: ${unit_name}_pripraven
          transition_length: 1s
          update_interval: 2s
      - pulse:
          name: ${unit_name}_servis
          transition_length: 100ms
          update_interval: 500ms

The effects list is not global. It needs to be defined for each light.

tom_I, thank you for your advice. I didn’t know that, now everything works correctly.

1 Like