Turn Off All lights after door close after mid night

Little Help…

I 've a door in my room and I’d like after close (midnight), all lights turn off, however these lights were not turned on with this door (sensor).

In the app it is possible to turn off only when the action takes on the same sensor or when someone leaves the room.

My idea is turn off all lights when entering in my room and close the door after 00.00.

Thanks for support ( my first topic ).

[ ]s