A small Home Assistant custom integration that adds a lock to a cover.
lockable_cover creates a proxy cover entity that mirrors an existing cover
(state, position, tilt, supported features) but blocks movement commands sent
to this proxy while a lock entity is on — no matter where the command comes
from (UI, automation, app, voice). stop is always allowed as a safety measure.
Scope: the lock only guards commands targeting the proxy cover. Commands sent directly to the underlying source cover are not intercepted, so point your dashboards and automations at the proxy entity.
It pairs nicely with the companion Lockable Cover Card, which renders the open/stop/close controls plus a position slider and a lock toggle directly on the card. The card also works standalone, but this integration is what enforces the lock at the backend level.
- In Home Assistant go to HACS → ⋮ → Custom repositories.
- Add
https://github.com/neffez/lockable-coverwith category Integration. - Install Lockable Cover.
- Restart Home Assistant (a full restart is required for a new platform — a reload is not enough).
Copy the custom_components/lockable_cover folder into your Home Assistant
config/custom_components/ directory and restart.
# configuration.yaml
cover:
- platform: lockable_cover
covers:
office_lockable:
name: "Office"
cover_entity: cover.office_blind
lock_entity: switch.office_lock # switch / input_boolean / lock
invert: true # optional: lock entity is ON when *unlocked*| Option | Required | Description |
|---|---|---|
cover_entity |
yes | The underlying cover to wrap. |
lock_entity |
yes | The entity used as the lock (switch / input_boolean / lock). |
name |
no | Friendly name for the proxy cover. |
invert |
no | true if the lock entity is on when unlocked (e.g. KNX shading-release group objects). Default false (on = locked). |
fail_secure |
no | true to treat the cover as locked (block movement) when the lock entity is unavailable/unknown. Default false (movement allowed when the lock state can't be determined). |
The config slug becomes the entity_id, so the example above creates
cover.office_lockable named "Office".
Extra attributes exposed on the proxy entity: locked, lock_entity,
source_entity.
Lockable Cover Card renders a
native cover tile with a lock chip in the corner (and a tile-feature variant).
It auto-reads the locked / lock_entity attributes from this integration's
proxy entity.