Mqtt_json payload to force effect solid in an automation

I am sending this payload directly to my light using mqtt_json:

payload: '{
“state”: “ON”,
“brightness”: 150,
“color”: {
“r”: 0,
“g”: 255,
“b”: 0
},

It works a treat the light turns on and goes green, if I have been using effects before hand the light will not turn solid green, I though about adding “effect”: “solid” to the payload

payload: ‘{
“effect”: “solid”
“state”: “ON”,
“brightness”: 150,
“color”: {
“r”: 0,
“g”: 255,
“b”: 0
},
“transition”: 1
}’

But it won’t work.

How would i edit the code the light receives so that it turns it to solid green?

Thanks in advance.

MQTT is just a transport mechanism. What is important is the device that receives the message and interprets the commands in the MQTT message.

Unfortunately, you don’t say what that is, so nobody can help atm.

1 Like

OK sorry my mistake, It is for the Bruh LED light system, made with a NodeMCU and an addressable LED strip. i can do loads of stuff with it i just don’t know how to force it to solid in an automation. Thanks

Hi Gavin bit later to the table here. If you still having trouble. I’m using a forked project from bruhs . But when I do scripts to change between effects i use light.on with the entity id not the mqtt publish.