I am new to Hubitat and home automation and was looking to see if anyone could please help me. I come from Smartthings (Webcore) but never had anything super advance since the hub never worked or had delays or was down. With that said I am sticking to using Rule Machine and all the built in apps on the Hubitat since my rules are all basic. So what I am trying to accomplish here is, when my garage is open, I want the current state of the selected lights to be saved, then the lights to dim up and down as long as the garage is opened, once the garage closes; I want the lights to return back to their original states: example if they were off, then return to off etc. For some reason I cannot get this to work, I am sure it is because I am a rookie and I am doing something wrong. Any help you guys can provide would be great. Thank you so much!
Two things I see. You can delete both IF garage door lines in the rule. You don't need the first IF Garage Door open. The rule would not execute unless the garage door is open because that is your trigger. You also don't need the IF door closed END REP. You are using a while so once the door closes it will no longer repeat.
I would start with those two changes and see how it goes.
Also both of your IFs are missing the END IFs, FYI. I think you should delete both but in future if you have an IF you need an END IF.
Looks good. I have not used the capture and restore function in any of my automations so not sure how that will work. Might have to play with your delays, but the rule looks correct.
It looks like your While loop is cycling the selected lights between 90 and 35 every 5 seconds. I'm not sure that you need to set the Office Hub Light color every 10 seconds. I don't think it's hurting anything inside the loop but I'd try to move it to before the While loop. I'd also typically recommend making the delay cancelable but since your loop is only 10 seconds you probably won't get multiple instances of this rule running if the door is closed then immediately opened again for some reason.
Webcore is built in to Hubitat now. I don't personally use it, but it is available. If you had an existing webcore from ST, that might be an easier transition.
Rule works flawlessly now. The capture also works. I learned a lot just by the few things you and a few others have told me. I also managed to fix a few other rules by adding the END IF, weird how some work without it and some don't.
Thank you all who commented here and helped me out.