Night, work, absence mode automation on node red

Hello everyone,

I would like to automate an absence, work and night mode on HA with node red.

A particularity for the night mode is that :

the detector in the corridor should only detect movement and display a lamp in night mode
turn on the mosquito lamp for 1 h only in night mode.
Work mode

turn off music
etc etc …

At first, I tried scenes with ha, which worked well for me, but I’m having trouble fitting them together. For example, only triggering the corridor sensor in night mode is a real nightmare.

My node red installation works fine, but I’m a bit lost when it comes to retrieving the status of my scenes and triggering them. I activate my scenes mainly via Google home, which works.

What do you think is the solution to easily manage these night and absence modes?

Sincerely