From 3b53e7a5e338c026678cfb7eeffcf76bb8ab8e5f Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Sat, 25 Apr 2020 09:08:44 +0200 Subject: [PATCH 1/3] Rename LockDevice to LockEntity --- docs/entity_lock.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/entity_lock.md b/docs/entity_lock.md index 15096f8a992..9459e75383b 100644 --- a/docs/entity_lock.md +++ b/docs/entity_lock.md @@ -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.""" From a66aad1617cb4d4aff041c01b0eabaefcb22f254 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Sat, 25 Apr 2020 09:39:12 +0200 Subject: [PATCH 2/3] Add link to base class --- docs/entity_lock.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/entity_lock.md b/docs/entity_lock.md index 9459e75383b..8e6ba64ca2b 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 entity platforms from [`homeassistant.components.lock.LockEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/lock/__init__.py). ## Properties From 93c9f31e1f15cd910cc4c0129216cd38d3a9618a Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Sat, 25 Apr 2020 18:02:25 +0200 Subject: [PATCH 3/3] Wording --- docs/entity_lock.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/entity_lock.md b/docs/entity_lock.md index 8e6ba64ca2b..62fe3d72ea4 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 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 entity platforms from [`homeassistant.components.lock.LockEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/lock/__init__.py). +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