espHome support for Adafruit LED Backpack via Lambda without component

espHome does not have a Display platform for the HT16K33 chip on the Adafruit LED Backpack used for their 7-segment display. Neither does it have a Display custom component. I’m not knocking espHome. To the Contrary, I think espHome is spectacular and Otto Winter is a hero. So, I tried to create an I2C custom component or a generic custom component to drive the display. I got them working, but could not get on_value lambdas to share data with them or access their functions. I’m sure a competent C++ developer could do it quickly, but that’s not me.

However, during my trials and (mostly) errors, I discovered that by including (compiling) the Adafruit_LEDBackpack code I could do whatever I wanted directly in the lambdas.

My example code is here.

3 Likes

Thanks for that code, @jaalperin. It was really useful to get me started with my own Adafruit LED Backpack clock. I found it wasn’t quite working, but with a bit of searching and head-scratching, and many, many, installs of slightly different versions, I now have a working version using 2024 versions of ESPHome and Home Assistant:

If anyone would like to try my version as a basis, I’ve got a write-up here.

Maybe one day we’ll get a proper Display platform for the HT16K33!