Can you help???

Hey everyone,
I would love some help on this one!
This is the logic I am using for my downstairs lights.

Just as an fyi… This was what I am shooting for.

Kitchen and Foyer lights only go on with motion at night and if the lights are under 10% load.

If the off switch has been pressed within 10 minutes, I don’t want them to activate.

The auto off on both areas will only turn the lights off if they were activated by motion. This is done with a virtual switch called xxxxautolighton.

Here are the problem I have been having.

As soon as night is activated, my foyer lights have been flickering.

When night is activated, my kitchen lights have been dimming.

in the morning, all off the downstairs lights are on.

Any help you guys can give is appreciated!

Gary Schellerer