Automation to switch RGB effect?

Hello all, I’m using a NodeMCU to switch a RGB strip. It works well, and I can control the RGB as desired from my HA dashboard card.

I’d like to use an automation to control the lights using a RFID tag. This too works, but the automation doesn’t seem to offer control of the RGB mode (I want the lights to come on in “Random effect with custom values” mode).

The automation GUI doesn’t offer this option, and II have tried adding an effects line to the YAML, which isn’t recognised.

Am I missing something obvious?

You need to manually add any effects you may want for a light and then it will show up in automation gui. So, if you want Random, then you need to include that effect.

That’s what I hoped would happen, but no effects in the automation GUI even though they’re configured in the ESP.
In the automation, I just get choices for on, off, toggle, flash and brightness. No random.

Well, wheres your config at?

Did you look under the “Advanced Options” tab? Thats where you configure effects and much more stuff beyond On/Off and Toggle.

1 Like

Wow, every day really is a school day. My automation wasn’t using Light: Turn on as the action, instead I was going straight to the device and controlling the RGB from there, and so I didn’t see the advanced options.
Thanks to your help, all is now working as I wanted it. Cheers, Justin!

Oh, dont thank me yet. When you get my bill in the mail, you might be cursing at me instead…

1 Like

If you post your esphome yaml, it could likely be improved more. For example if the rfid reader and RGB lights are both being controlled by the same NodeMCU then its much better to put the automation with them instead of in HA. Doing it that way will protect yourself from if HA ever crashes, you wont lose functionality of all your devices and automations.

At the risk of another bill in the mail? :rofl:

What can I say, I’m feeling generous today… Don’t push it though nickrout or you might find a surprise in your mail box too.