Conditions for motion sensors

Is like to have light and other motion sensors conditions on motion sensor (some of them are already available on switches/dimmers).

Example:
setup:
Lamp Corridor
Lamp Entry
Motion Sensor Corridor
Motion Sensor Entry

I want to have sensors work in tandem such:
If Corridor sensor is idle (ideally extra condition if all lamps are off), and Entry motion is triggered, activate all lamps (ideally different scenes depending on time)
If Corridor sensor is not idle, and Entry sensor is triggered, wait 2 min and turn off all lamps

This is to achieve a very simple behavior: light up when I enter the home, and turn everything off when I leave