Configuring WLED with MQTT

Hello,

I’m having some trouble with configuring my WLED in home assistant. What I am trying to do is adding WLED to my home assistant environment. The tricky part is that i am trying to do this using MQTT with detection disabled. I have set my home assistant IP as my MQTT broker

Here is my config.yaml:

light:
  - platform: mqtt
    name: “wled1”
    state_topic: “wled/light/status”
    command_topic: “wled/light/switch”
    brightness_state_topic: ‘wled/light/brightness/status’
    brightness_command_topic: ‘wled/light/brightness/set’
    brightness_scale: 100
    rgb_state_topic: ‘wled/light/rgb/status’
    rgb_command_topic: ‘wled/light/rgb/set’
    qos: 0
    payload_on: “ON”
    payload_off: “OFF”
    optimistic: false

And here is a screenshot of my WLED settings:

The weird thing is that Home Assistant detects the entity in Lovelace and I can even add it, but when I click the “on” button nothing seems to happen. Sometimes the on switch works but my LED device won’t react to it (and neither does WLED).

Any help is greatly appreciated.

Guys, i’ve found the answer. I was using a VM for my HomeAssistant environment and had to make sure the connection of the virtual machine was set to bridged. If you do this, your HomeAssistant can communicate with WLED.

I hope this helps someone someday.

3 Likes