Automation with MQTT Flashed Ailight

Hi Guys,

I am trying to do one automation which should be easy but its not working . I have a door sensor , and flashed aiglight (as MQTT json light) . I just need to turn on the light when the door is open. I have the trigger set right ,as I am using the same trigger to push a mobile notification. The thing is with the Action for the Ailight , i tried both light.on with { “entity id”:“ailight_doorentrance” , “state”:“ON”} , and the mqtt.publish on both {“payload”:“ON”,“topic”:“AiLight-147752/set”} and { {“payload_template”: { “state”: “ON”}, “topic”: “AiLight-147752/set”} . Both are not working . I am a bit confused. Any idea here

Okay i solved this . The problem was with the payload_template syntax …