Turn on lights and leave them on between specific times of the day


My wife works in a home office in my basement and there are 2 lights that are controlled by a motion sensor during certain times of the day and on the weekends. When my wife is working, however, I want the lights to just come on and stay on during certain times of the day. I have set up a custom automation to do that, and it was working it seemed for awhile now. I changed the batteries on the motion sensor, however, and now the automation has stopped working. Is there something I need to do in order to make this start working again? I’m getting pretty annoyed every 20 minutes for her complaining to me that the friggin’ lights are going off again. She’s having to jump around downstairs to get the danged things to come back on. The batteries are good in the sensor, so what the F?