McLighting Automation

Hi Guys,

I’m using a new led strip with a ESP8266 flashed with McLighting, everything is working great! I can control the color and effects with HA without an issue.

But i can’t figger out how to use this in an automation, for example how to set a rbg en brightness value or start an effect.

Has anyone got some examples for me?

You need to publish to an mqtt topic, as per: https://github.com/toblum/McLighting/wiki/Homeassistant-integration#mqtt-topics

So for example:

  action:
    service: mqtt.publish
    data:
      payload: '{ "brightness": 196, "color": { "r": 255, "g": 100, "b": 10 }, "speed": 194, "color_temp": 24, "effect": "Rainbow", "state": "ON" }'
      topic: 'home/HOSTNAME_ha/state/in'
      retain: false

Where HOSTNAME is the current hostname set in definitions.h

Thx! :slight_smile: