The use case it’s simple room occupancy based on motion sensor and open close sensor (presume all rooms have only one of each).
I want to turn the lights on if motion is detected.
Turn lights off if no motion
Keep lights on if motion detected after the door sensor is closed until door is opened again.
I can do the basic on/off based on one sensor but what’s the best way to structure multiple sensors? I looked for examples but couldn’t see this anywhere although there must be plenty of people using it!