Skip to content

Neffez/lockable-cover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lockable Cover

hacs_badge

A small Home Assistant custom integration that adds a lock to a cover.

What it does

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.

Installation

HACS (recommended)

  1. In Home Assistant go to HACS → ⋮ → Custom repositories.
  2. Add https://github.com/neffez/lockable-cover with category Integration.
  3. Install Lockable Cover.
  4. Restart Home Assistant (a full restart is required for a new platform — a reload is not enough).

Manual

Copy the custom_components/lockable_cover folder into your Home Assistant config/custom_components/ directory and restart.

Configuration (YAML)

# 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.

Companion card

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.

License

MIT

About

A Home Assistant Cover which supports locking with an additional switch

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages