From e8e5b9da98e60944181fdeb0ebd4b9e7d408fbb6 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Sat, 25 Apr 2020 18:22:34 +0200 Subject: [PATCH] Rename LockDevice to LockEntity (#478) --- docs/entity_lock.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/entity_lock.md b/docs/entity_lock.md index 15096f8a..62fe3d72 100644 --- a/docs/entity_lock.md +++ b/docs/entity_lock.md @@ -3,7 +3,7 @@ title: Lock Entity sidebar_label: Lock --- -A lock entity is a device which is able to lock and unlock. Locking and unlocking can optionally be secured with a user code. Some locks also allow for opening of latches, this may also be secured with a user code. +A lock entity is able to be locked and unlocked. Locking and unlocking can optionally be secured with a user code. Some locks also allow for opening of latches, this may also be secured with a user code. Derive a platform entity from [`homeassistant.components.lock.LockEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/lock/__init__.py). ## Properties @@ -30,7 +30,7 @@ Supported features constants are combined using the bitwise or (`|`) operator. ### Lock ```python -class MyLock(LockDevice): +class MyLock(LockEntity): def lock(self, **kwargs): """Lock all or specified locks. A code to lock the lock with may optionally be specified.""" @@ -42,7 +42,7 @@ class MyLock(LockDevice): ### Unlock ```python -class MyLock(LockDevice): +class MyLock(LockEntity): def unlock(self, **kwargs): """Unlock all or specified locks. A code to unlock the lock with may optionally be specified.""" @@ -56,7 +56,7 @@ class MyLock(LockDevice): Only implement this method if the flag `SUPPORT_OPEN` is set. ```python -class MyLock(LockDevice): +class MyLock(LockEntity): def open(self, **kwargs): """Open (unlatch) all or specified locks. A code to open the lock with may optionally be specified."""