Roomba routine - Logic help


1) Give a description of the problem
I need help with the logic for creating a routine for my roomba. I have the roomda integration with ifttt working and a bunch of other automations written so I know what I am doing generally but this one has been kicking my butt.

2) What is the expected behaviour?
Once a day at a set time
Check the status of a virtual switch in Smartthings
IF on do the thing
IF off do nothing


PART 1-----
Turn on specific lights, tell roomba to run
(This above I can do no problem)

PART 2-----
THEN when Roomba is finished, turn off the lights

3) What is happening/not happening?
I am having trouble with figuring out how to wait until the roomba is done and then kick off the 2nd part. I can track the status of the roomba in several ways, that’s not an issue. It’s the ‘wait until’ part that’s killing me. I failed at a ‘while loop’ doing this. I would paste what I tried below but…

**4) Post a Green Snapshot of the piston!
I nuked what I had. I was mad.

5) Attach logs after turning logging level to Full
I nuked what I had. I was mad.

Looking for advice on HOW to do this. Point me in the right direction if you can pls.

Sorry if this isn’t enough info. I can try it again maybe but as I said…
I nuked what I had. I was mad. :stuck_out_tongue:


I would keep it simple and let iFTT do the work since you are already leveraging it anyway.

The IRobot channel on iFTT can interact directly with SmartThings upon “Mission Complete”. I have it turning on a switch for me, indicating complete. You could have it directly interact with that light, turning it off or with another virtual device if you want to do other things with “PART 2” in webcore.