[ISSUE] The operation after a refused write is not paced
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
The issue identifies BaseLock._execute_locked as the pacing entry point and says regression tests were written in #1638. Read that method and the related tests first, then reproduce a refused write followed by another operation. Done when every operation sent to the lock advances the pacing delay, including refused writes, and the regression test verifies the gap.
Written by the indexing model from the issue text.
Description
What happened?
Lock Code Manager spaces operations on a lock by its minimum operation delay (2 s by default), but it only records the time of an operation when the call succeeds (BaseLock._execute_locked updates _last_operation_time after the call returns). A write the lock refuses is still a round trip to the device, yet the next operation goes out immediately.
Measured with the real 2 s delay and a lock that refuses one set: gaps between operations reaching the lock were 2.0 s, 0.0 s, 2.0 s, 2.0 s. A lock that keeps refusing gets its next command with no spacing each time.
Expected: every operation that reaches the lock, refused or not, counts toward pacing.
Steps to reproduce the issue
- Set up a lock with two slots out of sync.
- Make the lock refuse the first slot's set (for example a Supervision Fail, or a Zigbee lock rejecting the code).
- The second slot's set reaches the lock immediately after the refusal, with no 2 s gap.
Reproduced in the test harness while writing the regression tests in #1638.
Home Assistant Version
2026.9.4
What version of Lock Code Manager are you running?
main after 6.0.1
Lock make and model
Any (provider-independent; in BaseLock).
Anything else?
Related: #405, #532 (pacing), #1638.
- Dominant language
- Python
- Stars
- 108
- Forks
- 18
- Avg merge
- 1h 50m
- Merged PRs (30d)
- 103
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raman325/lock_code_manager
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 22/100
raman325/lock_code_manager#1697 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 22/100
raman325/lock_code_manager#1695 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 24/100
raman325/lock_code_manager#1691 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
raman325/lock_code_manager#1684 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
raman325/lock_code_manager#1581 · 3 comments ·
Maintainers usually reply within 1 day
All issues in raman325/lock_code_manager
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
aws-samples/sample-per-model-bedrock#243 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
FuRongJun-1999/dsh-memory#404 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PennyLaneAI/catalyst#3337 ·
Maintainers usually reply within 1 day
-
Workflow.schedule stops when a cron deadline passes before sleepPossibly taken @HuaTNA claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day