This is pretty standard for garage door controllers, even the smart ones.
With two sensors you can keep track of the last state and based on the last state forgot it what state the door entered as a result of the button press.
| Previous state | Current state | new state |
|---|---|---|
| Any | Closed | opening |
| Any | Opening | stopped |
| Opening | stopped | closing |
| Any | closing | stopped |
| Closing | stopped | opening |
| Any | opened | closing |
Writing a rule to that truth table should not be that hard. The only gotcha is the door opener would need to report when the physical button is pressed or else you won’t be able to detect the charger from stopped to opening or closing.
For scripted automation users, @glhopital created a state machine module which is predict to implement something like this. Finished State Machine in Jython