Update homekit controller lock to support locking, unlocking, jammed (#52821)
This commit is contained in:
parent
ee242764a1
commit
564a505486
2 changed files with 71 additions and 5 deletions
|
@ -57,3 +57,23 @@ async def test_switch_read_lock_state(hass, utcnow):
|
|||
helper.characteristics[LOCK_TARGET_STATE].value = 1
|
||||
state = await helper.poll_and_get_state()
|
||||
assert state.state == "locked"
|
||||
|
||||
helper.characteristics[LOCK_CURRENT_STATE].value = 2
|
||||
helper.characteristics[LOCK_TARGET_STATE].value = 1
|
||||
state = await helper.poll_and_get_state()
|
||||
assert state.state == "jammed"
|
||||
|
||||
helper.characteristics[LOCK_CURRENT_STATE].value = 3
|
||||
helper.characteristics[LOCK_TARGET_STATE].value = 1
|
||||
state = await helper.poll_and_get_state()
|
||||
assert state.state == "unknown"
|
||||
|
||||
helper.characteristics[LOCK_CURRENT_STATE].value = 0
|
||||
helper.characteristics[LOCK_TARGET_STATE].value = 1
|
||||
state = await helper.poll_and_get_state()
|
||||
assert state.state == "locking"
|
||||
|
||||
helper.characteristics[LOCK_CURRENT_STATE].value = 1
|
||||
helper.characteristics[LOCK_TARGET_STATE].value = 0
|
||||
state = await helper.poll_and_get_state()
|
||||
assert state.state == "unlocking"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue