I agree with being way more complicated that I would suggest. It makes it so hard to figure out what is going south in cases like this.
@jabecker have you looked at any apps to do this instead? When you get to a certain complexity, apps make a lot more sense than RM. It is not that RM isn't capable but the sheer number of lines of code and IF/THEN and nested statements just are.... overwhelming.
Maybe Lights On Motion Plus? That seems to handle modes and motion very well.