Home Assistant - 2nd Gen Switch RGB working!

I took a slightly different approach to setting LED colors. I am not familiar with node-RED, so I created a script in home assistant that I can just call when needed.

When the script is called from an automation, I can just pass some variables to the script, and it will calculate the correct value.

  • Color = red, orange, green, blue, yellow, cyan, or 0-255
  • duration =0-255, or “on”
  • effect = off, solid, fast_blink, strobe, slow_blink, pulse
  • level = 1-10
  • node_id = the node# to pass the parameter to
3 Likes