[Feature Request] Per-lock slot numbers for users
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Start by tracing slot storage and lookup in model/config.py, model/queries.py, config_flow.py, and init.py, then review the existing migration path and the per-lock worker in sync/worker.py. The issue describes changes across configuration, allocation, lookups, events, cards, diagnostics, and automations, so map those surfaces before estimating the work. Done means users hold a slot per lock, existing configurations migrate without lock-side changes, and the listed user-visible surfaces work with per-lock slots.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem Description
Each user holds one slot number (CONF_SLOT) that is used on every lock in the configuration. Lock Code Manager picks it when the user is added, as a number free on all of the configuration's locks at that moment. That shared number causes the hardest limits left in the "you don't pick slots" design:
- Allocation needs a number free on every lock. The more locks in a configuration, and the more unmanaged codes they hold, the fewer numbers qualify.
- Adding a lock is refused (
existing_codes) when the new lock already holds codes at numbers the configuration's users hold. The numbers were issued before the lock joined, and renumbering a user would mean rewriting their code on every other lock. - A smaller lock constrains the configuration (
slot_out_of_range): a user on slot 30 can't be added to a 20-slot lock even if it has free slots.
Feature Description
Give each user a slot number per lock instead of one shared number.
The 7.0 engine is already per lock, so most of the stack needs no change:
- one
LockWorkerper lock with its own slot table (sync/worker.py); - the
lock_code_manager.corestore is keyed per lock; - queries already take a lock:
slots_configured_on(hass, lock),configured_owner(hass, lock, slot); - tags (
lcm:<slot>:), events and attribution are read per lock; - Matter already decouples the slot from the device credential index, and Akuvox/Schlage have no indices at all (the slot only lives in the tag).
What would change:
- Config: a user holds
{lock: slot}instead ofCONF_SLOT, with a migration that copies today's number onto every lock (no lock-side change on upgrade). - Allocation: pick a free slot per lock; adding a lock picks free slots on that lock instead of refusing with
existing_codes;slot_out_of_rangegoes away. - Lookups: "user on lock" replaces "slot" as the key in
model/config.py,model/queries.py,config_flow.py,__init__.py(CONF_SLOTis read in ~17 places). - User-visible surfaces built on "slot N": event entity
code_slotattribute and slot-based automations, the lock codes card's per-slot rows, the user card, the duplicate check across entries (slots_already_configured), diagnostics, and the slot section strategy.
Anything else?
- Risk is mostly in the migration and in automations that assume the same
code_sloton every lock; this needs its own upgrade note. - A user's slot number could still default to the same number on every lock when one is free everywhere, so most configurations would look unchanged.
- Out of scope for 7.0.0; a candidate for 7.x.
- Lingua principale
- Python
- Stelle
- 112
- Fork
- 20
- Merge medio
- 2h 53m
- PR unite (30g)
- 140
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di raman325/lock_code_manager
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 20/100
raman325/lock_code_manager#1771 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
raman325/lock_code_manager#1768 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
raman325/lock_code_manager#1754 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
raman325/lock_code_manager#858 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
raman325/lock_code_manager#830 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di raman325/lock_code_manager
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
btclib-org/btclib-node#2083 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Gathin23/cleanyourtv#2089 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jxxghp/MoviePilot#7212 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
cli dx rust
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
NekomyaDev/nudge#278 ·
I maintainer di solito rispondono entro 1 giorno