Esphome partition examples?

Does anyone here have any examples of how to split a single same led strip into two or three separate controllable lights?

This seems to be able to combine but I can’t find how to split…

Thanks in advance!

Mark

BUMP

Anyone have any ideas how I might do this?

This may be of interest to you

1 Like

Thanks, I see the sample code has been updated. I will check it and have a look

Thanks!

ok - so i just dont seem to be able to get this working. So here’s a senario…

I have a NeoPixel ring with 16x LEDs all connected to a Wemos D1. I would like the 1st Led to be on one light and the next 10 to be on the other. This is what I have currently:

light:
  - platform: partition
    name: "ledstrip07_partition"
    segments:
      - id: ledstrip07_1
        from: 0
        to: 0
      - id: ledstrip07_2
        from: 1
        to: 10
  - platform: fastled_clockless
    chipset: WS2812B
    pin: D5
    num_leds: 1
    rgb_order: GRB
    name: "ledstrip07_1"
    id: "ledstrip07_1"
  - platform: fastled_clockless
    chipset: WS2812B
    pin: D5
    num_leds: 10
    rgb_order: GRB
    name: "ledstrip07_2"
    id: "ledstrip07_2"

Any ideas why this wouldnt work ?

Thanks in advance.

Did you get his working ? As I’ve not been able to with my light partition.
No errors even in debug mode, only seems to work if I have all the LEDs added.

I’ll post my code tomorrow.

1 Like

So couldn’t get it working for the life of me, but then tried it on another LED ring with 12 LEDS,
Here is were it gets strange…
If i turn on section1, nothing happens on the LEDS.
If i turn on section2, nothing happens on the LEDS.
If i turn on section3, the first two LEDS turn on on the ring (assuming the arrows on the PCB are pointing the correct way)

light:
  - platform: partition
    name: "ESP6_light_part"
    segments:
      - id: ESP6_section1
        from: 0
        to: 1
      - id: ESP6_section2
        from: 2
        to: 10
      - id: ESP6_section3
        from: 11
        to: 12
  - platform: fastled_clockless
    id: ESP6_section1
    chipset: WS2812
    pin: D1
    num_leds: 2
    rgb_order: GRB
    name: "ESP6 LED section1"
  - platform: fastled_clockless
    id: ESP6_section2
    chipset: WS2812
    pin: D1
    num_leds: 9
    rgb_order: GRB
    name: "ESP6 LED section2"
  - platform: fastled_clockless
    id: ESP6_section3
    chipset: WS2812
    pin: D1
    num_leds: 2
    rgb_order: GRB
    name: "ESP6 LED section3"

1 Like

Yes I see the same I couldn’t find a working example anywhere

@mark.carline
Think i got it, not sure how, i was looking at a closed github issue.

So i tried that way of writing the partition and after a few hours of banging my head (more cause i’m throwing up every few hours :face_vomiting: )
I have this.
Hope it helps.

light:
  - platform: fastled_clockless
    chipset: WS2812
    pin: D1
    num_leds: 12
    rgb_order: GRB
    name: "ESP6 LED Ring"
    id: LED_ring
  - platform: partition
    name: "ESP6_section1"
    id: section1
    segments:
      - id: LED_ring
        from: 0
        to: 1
  - platform: partition
    name: "ESP6_section2"
    id: section2
    segments:
      - id: LED_ring
        from: 2
        to: 9
  - platform: partition
    name: "ESP6_section3"
    id: section3
    segments:
      - id: LED_ring
        from: 10
        to: 12


3 Likes

Ok great I’ll try tonight + get well soon ! :wink:

Thanks, @cooljimy84.

You’re a star, this is not how the example looks in the docs though. Still got a lot more to put in, going to have 8 separate lights.

  - platform: neopixelbus
    type: GRB
    pin: GPIO5
    num_leds: 24
    name: "Kallax1"
    id: kallax
    effects:
      - random:
      - addressable_rainbow:

  - platform: partition
    name: "K1"
    id: k1
    segments:
      - id: kallax
        from: 0
        to: 11
    effects:
      - random:
      - addressable_rainbow:
  - platform: partition
    name: "K2"
    id: k2
    segments:
      - id: kallax
        from: 12
        to: 23
    effects:
      - random:
      - addressable_rainbow:

No problem, the docs tripped me up as well.

I found someone else’s example and then it all clicked