# Ledcontrol: Pico W controls LEDs from Home Assistant (or with buttons)

**URL:** <https://forums.pimoroni.com/t/ledcontrol-pico-w-controls-leds-from-home-assistant-or-with-buttons/20764>\
**Category:** Projects\
**Created:** [November 21, 2022, 11:48am UTC](https://forums.pimoroni.com/t/ledcontrol-pico-w-controls-leds-from-home-assistant-or-with-buttons/20764 "2022-11-21T11:48:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![disq](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/disq/32/8892_2.png) [@disq](https://forums.pimoroni.com/u/disq)\
**Post date:** [November 21, 2022, 11:48am UTC](https://forums.pimoroni.com/t/ledcontrol-pico-w-controls-leds-from-home-assistant-or-with-buttons/20764/1 "2022-11-21T11:48:37Z")

</div>

Hi,

Finally got my ledcontrol project working with MQTT over the weekend, even added Home Assistant MQTT discovery so it’s available on HA without any extra setup. So you just need to set a few variables in `config.h` (number of LEDs, defaults) and `config_iot.h` (for MQTT host/ip and credentials), compile/flash and you’re done. Each Pico W gets its own unique\_id as well!

It’s also possible to control it physically using the sparkfun RGB/push rotary encoder (but not necessary) and with that setup it’s possible to compile just for the Pico so no W needed. I had used the Pimoroni’s i2c encoder previously but it being not pushable (and more expensive) decided to opt for a simpler solution (but with more pins)

I need some feedback on this project about where to take it next. Here’s the page [GitHub - disq/ledcontrol: Control a LED strip with a knob, or with Home Assistant](https://github.com/disq/ledcontrol)

---

<div class="post-metadata">

**Author:** ![Vwillcox](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/vwillcox/32/5826_2.png) [@Vwillcox](https://forums.pimoroni.com/u/Vwillcox)\
**Post date:** [August 26, 2023, 8:54pm UTC](https://forums.pimoroni.com/t/ledcontrol-pico-w-controls-leds-from-home-assistant-or-with-buttons/20764/2 "2023-08-26T20:54:12Z")

</div>

Hi, any way this would work with the Plasma 2040 W?
