---
title: "door lock · RUAL Documentation"
description: "Locks a door, and holds it locked unless you ask it not to."
canonical: https://docs.rual.nl/block-types/globals/homeassist_door_lock
language: en
---

# door lock

This block is part of the [`globals`](https://docs.rual.nl/block-types/globals) group and was last modified in core [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

Locks a door, and holds it locked unless you ask it not to.

- flow `v15.0.0` `flow`

- device `v15.0.0` `value` Device id, native address, or exact device name. Leave empty to use the device picked on the block.

- keep schedule `v15.0.0` `condition` Lock now but leave the door's schedule running, so it unlocks again at its next scheduled time. Without this the door stays locked until something explicitly releases it.

- flow `v15.0.0` `flow`

- ok `v15.0.0` `condition` True when the command reached the device.

- device `v15.0.0` `object` The device the command was sent to.

- error `v15.0.0` `value` Empty on success. HOMEASSIST_DEVICE_NOT_FOUND, HOMEASSIST_DEVICE_NOT_ADOPTED, HOMEASSIST_CAPABILITY_UNSUPPORTED or HOMEASSIST_NOT_AVAILABLE.

Locks an access-controlled door. By DEFAULT this HOLDS the door locked, overriding its unlock schedule until something releases it (UniFi keep_lock) : the right behaviour when a flow locks a door because something is wrong. For "lock up for the night", set `until_schedule`: that ends the current unlock and leaves the schedule running, so the door unlocks again at its next scheduled time. The difference matters : a held lock survives tomorrow morning's scheduled unlock and strands everyone outside.

| `zigbee` |
| --- |
| `zwave` |
| `matter` |
| `thread` |
| `hue` |
| `smart home` |

### Version history

Introduced in [`v15.0.0`](https://docs.rual.nl/core-versions/150000).
