If you are unsure how to use the altitudes and azimuths from the suncalc driver in RM, i have an example in a previous post.
I can appreciate this logic, I try to do this as well to best of my ability… but sometimes is better to break things out into separate child apps to keep the automations simpler. Both approaches have their advantages/disadvantages and sometimes it takes a bit of trial and error to find the best way that works for you.