feat(tesa): add TESA Smartair provider#19
Merged
Conversation
New roomdoo-locks-tesa package implementing the BaseLockProvider contract (grant_access / modify_access / revoke_access / test_connection) on top of the TESA Smartair SOAP API (zeep), adapting the standalone library to the monorepo conventions. Key vendor-specific behaviour: - PIN generation copied verbatim: first digit is never 0 (TESA rejects a leading-zero PIN). - Check-in vs pre-check-in: a future starts_at routes the whole grant through precheckin (storing the preAssignationId); an immediate start uses checkin. The choice is recorded in the opaque ref so modify/revoke use the right endpoint. - PIN collisions raise LockPinCollisionError; an auto-generated PIN is retried with a fresh value (up to _MAX_PIN_ATTEMPTS), a caller-supplied PIN surfaces the error. - One PIN replicated across the room set, all-or-nothing rollback on failure. - revoke_access is idempotent (LockAlreadyClearedError swallowed). Wires the package into the root pytest config and the CI workflow. 41 new tests; full suite green (90 passed). Co-Authored-By: jvr5458 <jvr5458@users.noreply.github.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumen
Nueva librería
roomdoo-locks-tesaque implementa el contratoBaseLockProvider(grant_access/modify_access/revoke_access/test_connection) sobre la API SOAP de TESA Smartair (víazeep), adaptando la librería independiente de partida a las convenciones del monorepo.Comportamiento específico del proveedor
0(TESA no admite PIN con cero a la izquierda).starts_ates futuro, todo el grant va porprecheckin(guardando elpreAssignationId); si el huésped entra ya, porcheckin. La elección se registra en elrefopaco para quemodify/revokeusen el endpoint correcto.LockPinCollisionError: un PIN autogenerado se reintenta con uno nuevo (hasta_MAX_PIN_ATTEMPTS); un PIN suministrado por el caller propaga el error.revoke_accessidempotente (LockAlreadyClearedErrorse traga silenciosamente).modify_accesssolo cambia la fecha de expiración (TESA no permite cambiar PIN ni fecha de inicio).Integración
pythonpath/testpathsdelpyproject.tomlraíz.zeep>=4.2y dependencias transitivas se instalan automáticamente desde PyPI;roomdoo-locks-basese resuelve del editable instalado en el paso previo).Tests
🤖 Generated with Claude Code