Lock operation sensors for August (#32593)
* adkj * reduce * Convert august to async Async io was added to py-august 0.24 * Fix lint * Lock operation sensors for august * Tracking lock operation method allows user presence detection at the lock * revert lock changes * fix activity count merge conflict reversion * Fix revert that come back with the conflict
This commit is contained in:
parent
b9a9a92145
commit
ae147fd9c7
8 changed files with 437 additions and 3 deletions
|
@ -6,6 +6,7 @@ from homeassistant.const import (
|
|||
SERVICE_LOCK,
|
||||
SERVICE_UNLOCK,
|
||||
STATE_LOCKED,
|
||||
STATE_UNAVAILABLE,
|
||||
STATE_UNKNOWN,
|
||||
STATE_UNLOCKED,
|
||||
)
|
||||
|
@ -87,6 +88,17 @@ async def test_one_lock_operation(hass):
|
|||
lock_online_with_doorsense_name = hass.states.get("lock.online_with_doorsense_name")
|
||||
assert lock_online_with_doorsense_name.state == STATE_LOCKED
|
||||
|
||||
# No activity means it will be unavailable until the activity feed has data
|
||||
entity_registry = await hass.helpers.entity_registry.async_get_registry()
|
||||
lock_operator_sensor = entity_registry.async_get(
|
||||
"sensor.online_with_doorsense_name_operator"
|
||||
)
|
||||
assert lock_operator_sensor
|
||||
assert (
|
||||
hass.states.get("sensor.online_with_doorsense_name_operator").state
|
||||
== STATE_UNAVAILABLE
|
||||
)
|
||||
|
||||
|
||||
async def test_one_lock_unknown_state(hass):
|
||||
"""Test creation of a lock with doorsense and bridge."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue