Cannot figure out how to combine 2 automations

You may want to look into using variables in your scripts, cutting to the chase you can eliminate branching and many automations simply by listing everything in variables, as an example 3 automations handle my lights:

  1. Read presence sensors
  2. Read buttons (scene switches)
  3. Apply scenes

I simply update those automations to add more lights (and add scenes).

Here is an example of doing that: