Help - Dummy Swich

Hi,
Need some help solving my “logic”. FYI just moved from Domoticz

I want a switch to active night mode and to have my other logic depend on it.

So if switch activated: Nightmode is activated (turning on and off specific light, turning on/off specifik devices.

Some examples of other automation that is going to be depended on this.

Turn on light livingrooms light if lightsensor < 15 and device_home and not nightmode

any suggestions?

What you need is an input boolean