Home Assistant action trigger

I have set up the home assistant integration, and it works like a charm. However, I am trying to set up a trigger to turn the light on when there is motion on a camera, and off again when there is not. In HomeHelper I have light set to turn on, and reset to off after 5 minutes. The home action on my camera is set to turn on the light. What actually happens is that I assume a motion is detected, the light goes on, a few seconds later it goes off, then almost immediately it goes back on, since the motion is fairly continuous.

So it's detecting the motion and turning the light on correctly, but I'm not sure why it goes off almost immediately. Please let me know if I'm configuring it incorrectly.

Comments