Triggering routines from other routines

Is there a way to trigger one routine from another?

For example, I have one routine which detects that everyone has left and switches the lights off. I have another which detects that everyone has left switches on the security system.

However, programatically this seems strange… having to listen for the same trigger to initiate two events.

Also, at the moment the rule system seems quite limited, one event triggering one action. Is there a way to put some logic in there? Eg if (‘motion detected’ and ‘after sunset’) then fire alarm

I have one routine…shut down. After me or my wife leave and/or no living room motion for x minutes all my switches lights fans and whatever turn off and goes into away mode (security) if throuought the day any window door garage and certain office motion sets off my siren and alerts me. When me or my wife get home I have home light routine witch does kinda the opposite disarm turn on lights and tv in my case. So I would suggest just having two routines for coming and going home. Works great for me

Been awhile since I created a virtual switch… but IIRC you can have your “everyone leaves” routine do what it’s doing, but have it close one more switch. A virtual switch. And the action attached to that virtual switch is your “security on” routine.

I could be wrong (experts, let me know).