Door opens and thereafter a person is detected by camera

My security camera can detect a person, this is sent to Homey via a web hook.
The back door has a contact switch.
Philips Hue light in garden.

What I would like to accomplish is this:
When the camera detects a person, the light switches on full bright. (This is a simple flow, which I already have). So when an unauthorized person enters the garden, the light switches on full bright.

Now the next step, here I need your help.
When the backdoor opens (contact switch alarm) and after a few seconds a person, who steps through the door is detected by the camera in the garden, the light needs to switch on at 20% brightness, i.s.o. full brightness.
The idea is, when a person leaves the house via this door, the light is dimmed for convenience. If not leaving via the door, light at full brightness.
The door can remain open or can be closed, in both cases, light should be dimmed.
I do not want to work with personal presence.

So the door contact turns the light on at 20%. Then add a condition to the camera so it only sets the brightness to 100% if the door contact is closed.

The camera switches on the light not the door switch. But when the door opens first and thereafter the camera senses a person, the light needs to switch on in dimmed state.
The door can be opened, then stay open or be opened and closed immediately. In both cases, the cam sees a person and the light needs to switch on dimmed.