Skip to content

fix: support the addressable light changes of ESPHome 2026.11 - #127

Open
pfefferle wants to merge 1 commit into
m5stack:mainfrom
pfefferle:fix/addressable-light-esphome-2026.11
Open

pfefferle wants to merge 1 commit into
m5stack:mainfrom
pfefferle:fix/addressable-light-esphome-2026.11

Conversation

@pfefferle

Copy link
Copy Markdown
Contributor

ESPHome 2026.11.0 changed how addressable lights expose their pixels: get_view_internal() is gone and the light has to provide a color accessor instead. Because of that, the m5ioe1 and extio2 lights no longer compile:

error: could not convert '<brace-enclosed initializer list>' to 'esphome::light::ESPColorView'

I changed both lights to use a CorrectedBufferColorAccessor on the existing buffers, the same way esp32_rmt_led_strip does it in core. The old code is still there behind a version check, so 2026.10 should keep working.

I have not built this yet, and I have no extio2 hardware to test with.

The StackChan voice assistant loads m5ioe1 from m5stack/esphome@m5-dev, which has the same code, so it needs the same change there. I can open a second PR for that if you want.

/cc @parker-int64

@m5agent

m5agent commented Nov 23, 2026

Copy link
Copy Markdown

Thanks for the patch. I built it with both ESPHome releases and booted the 2026.11 build on a virtual ESP32; the version gate and the accessor wiring look correct.

Conclusion: no blockers from my side. m5ioe1 and extio2 compile against ESPHome 2026.11.0, and the same head still compiles against 2026.10.0 through the legacy get_view_internal() path.

Evidence level: host-level build + virtual-device validation (partial). No physical M5IOE1/EXTIO2 hardware, and the virtual ESP32 profile has no AW9523/EXTIO2 controller model.

What I ran

  • PR head 385dc4b, base main bc507b5. Built with ESPHome 2026.11.0 and 2026.10.0 (ESP-IDF 5.5.6, esp32dev, both hubs plus one addressable light each).
  • 2026.11.0: builds cleanly. The ELF no longer contains AddressableLight::get_view_internal for either light; the only warning from the touched files is the pre-existing %d vs int32_t format warning in extio2_light.cpp dump_config().
  • 2026.10.0: builds, and the ELF still defines both get_view_internal symbols. That also shows the guard resolves against the generated build version.h (2026.10.0), not the 2099.12.0 stub in the source tree.
  • Runtime: the 2026.11.0 image boots on a QEMU ESP32 profile with setup() finished successfully!. Core's VERY_VERBOSE pixel dump reads the buffers back through the new accessor: M5IOE1 R=255 G=0 B=0, EXTIO2 R=0 G=255 B=0 on all pixels (set via on_boot). Those would read back as zero if accessor_ still pointed at NullColorAccessor.
  • The construction matches core's esp32_rmt_led_strip and m5stack_8angle pattern; ChannelColors{0,1,2} keeps the previous RGB888 layout, correction and effect-data semantics.

Not covered

  • No M5IOE1/EXTIO2 hardware (as you noted), so real LED output, color order and optics are NOT RUN.
  • The QEMU ESP32 profile does not model the AW9523/EXTIO2 controllers: I2C 0x6F/0x45 return NAK and the hubs are marked failed, so the actual expander payload is NOT RUN (write_state() itself is unchanged).
  • Only static set/get; effect animations were not exercised.

One merge-order note: common/stackchan-voice-assistant-base.yaml still pulls m5ioe1 from m5stack/esphome@m5-dev, so the StackChan config remains broken on 2026.11 until that second PR lands. examples/kit/stackchan-bsp.factory.yaml points at m5stack/esphome-yaml/components, so it picks this up. The README ESPHome badge also still says 2026.10.0.

Commands, hashes, serial excerpt and configs: https://github.com/m5agent/agent-work-logs/blob/7bf49e82826316aae7a067698722e3d3b92028b5/records/m5stack-github/2026-11-23-esphome-yaml-pr-127-addressable-light/README.md

@parker-int64

parker-int64 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Thanks and yes, this is a breaking change. When we trying to PR the existing component to upstream, we cannot use our organization fork because upstream maintainers won't be able to edit the code.

Therefore a personal fork is necessary. But that shouldn't be a problem if you wish to PR to our organization fork. The components in this repo is deprecated and will be removed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants