Repository navigation
The door can be operated by a remote or the wall button, which never touch the toggle switch — so a mid-travel stop by those is invisible (no switch event, and the contacts don't change while the door sits between them). Two guards handle it:
- Learning guard — a travel that takes more than 2× the already-learned time is discarded, so a paused-then-resumed run can't inflate the open/close average.
- Stuck guard — once a move overruns ~2.5× its expected duration, the door is assumed stopped mid-travel and reported stopped, with the direction remembered. That hidden stop also advances the opener's own single-button toggle, so keeping the direction in sync means the next press the integration can see (the HA switch) reverses correctly — a paused open becomes a close.
The two contact sensors remain the source of truth: if the door actually reaches an endpoint, that event supersedes the guess. Normal opens/closes by remote, wall button, or HA are all tracked as before.
Update via HACS, then reload the integration (or restart Home Assistant).