Okay...but if there is a window, do you need the light on during the day?
Also, I do not understand your logic for the motion active. Why do you have a motion lighting rule for lights that are already on? This logic....
Is the part that I don't understand. So, I am just going to ignore all of that and you can sort that out by yourself. I'll leave a placeholder in the rule I'm going to lay out for you.
So, first, your triggers should be motion changing. You also need to create a local number variable. I will call in dimmerLevel. You also need to create a local boolean variable I'll call enable. The default for enable must be true. This is what i would have for my actions:
If Motion is Active then
Cancel Delayed action
If enable is true then
Capture state of the light
SET THE LIGHT HOWEVER YOU WANT HERE
Set variable dimmerLevel = the dimmer level of the light in question.
Set enable to false
Delay actions by 1 minute (cancelable)
If dimmer level of lights = variable dimmerLevel THEN
Set enable to True
Now, the enable to true, I don't know how you want that to happen. Because I don't know what you would do with the lights after manually changing them and canceling the motion off. You could move it inside of the if/then with the restore and then also make another rule setting it true when the lights turn off if you want too. You would then have to make it a global variable.
I will say, this is a lot more complicated than I would expect for a hallway. There are ways that this could be vastly simplified to make it run a lot quicker. But this is what you asked for...
You also realize that by having the first else-if not contain the switch being on, that this will trigger as true if the lights are off but the last level they were set to was less than 60, correct? Also, I don't understand why you have < 60 and <50. Those are awfully close together.