Migrate lock component to async (#5748)
This commit is contained in:
parent
32dc276c53
commit
2b124a008c
4 changed files with 58 additions and 26 deletions
|
@ -43,9 +43,9 @@ class DemoLock(LockDevice):
|
|||
def lock(self, **kwargs):
|
||||
"""Lock the device."""
|
||||
self._state = STATE_LOCKED
|
||||
self.update_ha_state()
|
||||
self.schedule_update_ha_state()
|
||||
|
||||
def unlock(self, **kwargs):
|
||||
"""Unlock the device."""
|
||||
self._state = STATE_UNLOCKED
|
||||
self.update_ha_state()
|
||||
self.schedule_update_ha_state()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue