Tesla MyQ triggered open or close

With the new integration of MyQ with Tesla, I was updating my Node Red Automations so that if the garage opens or closes do something. Here’s the kicker. I have an automation that if the garage opens, wait and see if the car is home and unlock the front door. Then it waits to see if I plug in the charger and if so, close the garage. Issue is if I need to go into the garage and open it from the keypad, the door will close right after opening because it triggered the open to open the front door and then because it is charging, closes the door.

Is there a way to know if the reason the door was opened was through the Tesla doing MyQ?