Exploring MQTT Device Configuration for Smart Lighting

Hi everyone, I’ve been diving into the world of MQTT and smart lighting lately, and I wanted to share my experiences and a few questions I’ve encountered along the way.

First off, I’ve successfully integrated a few smart bulbs into my home automation setup using MQTT. The process was pretty smooth, and I love how the dimming feature works right out of the box. Here’s a quick snippet of my working configuration:

yaml

  • platform: mqtt
    name: “Living Room Lights”
    state_topic: “home/living_room/lights/state”
    command_topic: “home/living_room/lights/command”
    brightness_state_topic: “home/living_room/lights/brightness”
    brightness_command_topic: “home/living_room/lights/brightness/set”
    brightness_scale: 100
    payload_on: “ON”
    payload_off: “OFF”
    retain: true

However, I’ve hit a bit of a snag with a dimmer switch I’m trying to set up. The switch itself works perfectly for turning lights on and off, but I’m missing the brightness slider functionality. I’ve scoured the forums and found some helpful tips, but nothing quite addresses my specific setup. Here’s what my switch configuration looks like:

yaml

  • platform: mqtt
    name: “Hallway Lights”
    state_topic: “home/hallway/lights/state”
    command_topic: “home/hallway/lights/command”
    brightness_state_topic: “home/hallway/lights/brightness”
    brightness_command_topic: “home/hallway/lights/brightness/set”
    payload_on: “ON”
    payload_off: “OFF”
    retain: true

I’ve tried tweaking the brightness_command_topic with and without /set at the end, but no luck so far. Does anyone have any insights or suggestions on what might be missing here?

On a more positive note, I’ve found that using MQTT for lighting control opens up a lot of possibilities for automation. For example, I’ve set up a rule where the lights dim slightly when I’m watching TV, creating a more immersive experience. It’s these small touches that really make a smart home feel like home.

If anyone has tips on troubleshooting MQTT device configurations or creative ways to use MQTT for lighting, I’d love to hear about them! Happy automating everyone!