ESPHome convert Wemos D1 Mini w/ws2812b Strip

Howdy folks!

So I’ve been using Home Assistant for a few months right now and loving it! On my todo list for a while has been playing around with ESPHome as well so yesterday was my first foray in getting it setup via Docker and my first couple tests (flashed a pair of Sonoff S31 smart plugs and got them connected to Home Assistant, worked perfectly first try which is such a rarity).

Now my next mission is to look at some of the custom lightstrips that I have setup. So the primary ones I’m looking at right now are Wemos D1 Minis with a strand of 60 ws2812b lights. Currently I have some custom written stuff in the Arduino IDE that connects it to MQTT to get the data in what it’s supposed to be doing.

Light 1 gives me a visual representation of the current level of charge for our powerwalls and an animation with whether it’s charging or discharting (it’s subscribed to an MQTT topic that Home Assistant publishes data to about every minute with a format of [chargelevel]/[chargerate]/[Hour]/[Minute]) and will fill a percentage of the bar with what level charge and make the LEDs brighter going up if it’s charging, or dimmer going down if it’s discharging.

Light 2 gives me a visual representation of the amount of solar power we are generating vs. the amount of power the house is taking (it’s also subscribed to an MQTT topic with a format of [homepower]/[solarpower]/[Hour]/[Minute]). It does animations as well with color overlaps (blue is solar generation, red is power consumption, overlapping values become purple, so if there’s red on top I’m using more power than I’m generating, blue on top I’m making enough solar…it works well when combined with the charge/discharge rate on the other light).

You can kind’ve get an idea of what that looks like here:

Effectively, my question is - is there an easy way to create custom animations using ESPHome? Or is it realistically going to be me using the custom component stuff from here? I imagine I need to do that so I’ll probably have to scratch my head on it a bit.

I believe you will have to use custom component. What you have seems to work, I suggest you don’t fix it lol.