Best practice / time based light with manual override

Hi,

I have just started using Home Assistant/Node Red and converting my automations to it.

I have a light control that uses the Node presence-faker and starts/stops based on the position of the sun.

I want to store in a variable (flow.X) whether the light was activated manually or by the node presence-faker. If the light was turned on manually, presence-faker should not turn it off.

How can I adjust/optimize my flow or do you have a basically better idea for implementation. I am grateful for any suggestion!

Thx
oed