Dominevo
ReferenceDevice capabilities

lock-control

Smart-lock cap.

Smart-lock cap. Models HA lock.* entities — anything with a locked / unlocked binary state plus the four transient lifecycle states (locking / unlocking) and the jammed failure state that low-end deadbolts surface when the motor can't reach the target position.

Some HA locks require a PIN code on every lock/unlock operation (workplace keypad locks, hospitality). The optional code field on the methods passes it through to the upstream service — the code is NEVER persisted in the runtime slice or any event payload. Whether a lock REQUIRES a code is the slice's codeRequired (#459): true / false when the provider knows, null when it does not.

Locks that support a latch-release ("open door") action advertise DeviceFeature.LockOpen. The open method triggers the latch without a full lock/unlock cycle. Only available when the lock reports LockEntityFeature.OPEN (bit value 1) in HA supported_features.

door-open: the linked door contact reads open, so the bolt cannot be thrown. It is the lock's REAL reported state, written into the mirrored slice by the door-contact Customize extension — never a provider's own value, and never a projection a reader has to compute. Precedence: a native jammed wins; otherwise an open contact reports door-open whatever the native state says (locked included); a closed or unknown contact leaves the native state. A lock() is refused while the state is door-open; unlock() never is.

At a glance

Capabilitylock-control
Provided byThe device's own driver provides it: each device registers its own provider.
Active providers per deviceone
Device typeslock
Sourcepackages/types/src/capabilities/lock-control.cap.ts

Methods

Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.

MethodKindRequired of a providerAccess
lockmutationyesprotected
unlockmutationyesprotected
openmutationnoprotected

lock

mutation

Input

FieldTypeRequiredDescription
codestringnoOptional PIN code required by some keypad locks. NOT persisted — passed directly to the upstream service.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
lock.lockLockstate = "locked"

unlock

mutation

Input

FieldTypeRequiredDescription
codestringno
confirmbooleannoHonoured by a helper lock GROUP only: unlocking several doors with one call is refused unless the caller says it was confirmed. A single lock ignores it. The refusal lives in the callee, so no automation or API caller reaches the doors by skipping a dialog.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
lock.unlockUnlockstate = "unlocked"

open

mutation · optional for a provider

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
lock.openOpen latch

Runtime state

The state Dominevo keeps for each device with this capability, readable without calling the provider.

Runtime-state slice — mirrored by the kernel. UI lock buttons read state and disable themselves during locking/unlocking transitions.

FieldTypeRequiredDescription
state"locked" | "unlocked" | "locking" | "unlocking" | "jammed" | "door-open"yesLifecycle state of the lock. jammed means the motor reported failure to reach the target — operator intervention required.
codeRequiredboolean | nullnoWhether lock / unlock need a PIN code (#459, replaces the lock-pin-required device feature). null = the provider cannot tell — never false. .optional() so a restored slice written before the field still parses; readers treat absent exactly like null.
lastChangedAtnumberyesMs epoch when the slice was last updated.