Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[ISSUE] The operation after a refused write is not paced

Closed Beginner friendly
#1,642 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend, devtools

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

bug
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
  1. Set up a lock with two slots out of sync.
  2. Make the lock refuse the first slot's set (for example a Supervision Fail, or a Zigbee lock rejecting the code).
  3. 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

Open in Codespaces

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raman325/lock_code_manager

All issues in raman325/lock_code_manager

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.