GET request every 5 minutes for approaching bus info


#1

1) Give a description of the problem
I’ve put together piston that hits an API to get the number of minutes until a particular bus will be at my house. I want it to run every 5 minutes if 1) I’ve activated the Good Morning routine and 2) I’m still at home. I’ve achieved this, but I feel my piston is very sloppy and would like some eyes on it.

2) What is the expected behavior?
POST request sent to API to obtain updated info (uses a web-scraping API site), then a GET request is sent to retrieve the minutes until the next bus arrives. That info is stored in a variable, texted to me and then a switch is activated that makes my sonos speakers say “Bus is arriving soon” if the bus is less than 10 minutes away. Then Wait 5 minutes and repeat the process.

3) What is happening/not happening?
(PUT YOUR INFO HERE)

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)