Skip to content

Fix delete_command not removing buttons#18

Merged
kongo09 merged 1 commit into
mainfrom
fix-delete-scan-delay
Mar 6, 2026
Merged

Fix delete_command not removing buttons#18
kongo09 merged 1 commit into
mainfrom
fix-delete-scan-delay

Conversation

@kongo09
Copy link
Copy Markdown
Owner

@kongo09 kongo09 commented Mar 6, 2026

Summary

  • Root cause: Broadlink uses async_delay_save with CODE_SAVE_DELAY = 15 seconds when persisting command deletions to disk. Our DELETE_SCAN_DELAY was only 2 seconds, so the re-scan read stale storage data before the write completed — the deleted command still appeared in storage, so no button was removed.
  • Fix: Increase DELETE_SCAN_DELAY from 2 to 30 seconds (matching LEARN_SCAN_DELAY), ensuring the scan runs well after the storage write completes.
  • Updated README docs to reflect the new delay.

Test plan

  • All 57 tests pass
  • Lint clean
  • Manual test: call remote.delete_command, verify button is removed after ~30 seconds

🤖 Generated with Claude Code

Broadlink uses async_delay_save with a 15-second write delay, but
DELETE_SCAN_DELAY was only 2 seconds. The re-scan read stale data
from disk before the write completed. Increase to 30 seconds to
match LEARN_SCAN_DELAY.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kongo09 kongo09 merged commit b2271d1 into main Mar 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant