Motion sensor only turn lights on and off if the light is off

I want to configure a motion sensor so that it turns on three lights and then they go off five minutes later. However, I don’t want it to turn the light off if it was already on. Here is what I am thinking of doing, but I am new to Home Assistant so I am asking too questions: will this work, is there a better way.

My thought is that I would create three different automations that will trigger when motion is detected. They will each have two conditions: that the time is between sunset and 11 pm and that the light is off. The three different automations would be for each light. This way if all three lights are off, they would all go on and stay on for five minutes. If any single light is on, it will stay on and the other two will turn on and go off in five minutes, but the one that was on will stay on.

Will that work?

In case you are wondering my house is on a hill and the front opens to an entry with stairs up to the main part of the house. I will have the sensor turn on the porch light, the entryway light and the stairs light. I am thinking I would only have it happen in the dark up to 11, but I might have it trigger all night or maybe the entry and stairs up to 11 and the porch all night.