Roborock Segmented Cleaning Node Red

Hi all,

Been trying to set up an automation that starts a segmented cleaning for my Roborock, but see now that my knowledge of Node Red is coming short.
I’ve currently got this setup in HA as five standard automations:

1: If time between 12:00 - 18:00, and theres no one home; Start Cleaning segment 18, and turn on Automation 2

2: If State of Roborock is “Returning”, Start Cleaning segment 16, Turn on Automation 3 and turn off Automation 2

3: If State of Roborock is “Returning”, Start Cleaning segment 20, Turn on Automation 4 and turn off Automation 3

and so on…

This works quite well, but was hoping to find a neater way to set this automation up in Node Red - havent found any useful help so far (probably because I’m not really sure what to search for…)

Does anyone have an idea of how I could set this up? Do I need to create seperate Flows for each Cleaning Segment?

Thanks!

Regards
Martin