Fix using execute on the notify_leaving_zone (#43858)
This commit is contained in:
parent
55edc9f858
commit
ff4897a09e
2 changed files with 22 additions and 1 deletions
|
@ -115,6 +115,15 @@ async def test_notify_leaving_zone(hass):
|
|||
|
||||
assert len(mock_call_action.mock_calls) == 2
|
||||
|
||||
# Verify trigger works
|
||||
await hass.services.async_call(
|
||||
"automation",
|
||||
"trigger",
|
||||
{"entity_id": "automation.automation_0"},
|
||||
blocking=True,
|
||||
)
|
||||
assert len(mock_call_action.mock_calls) == 3
|
||||
|
||||
|
||||
async def test_motion_light(hass):
|
||||
"""Test motion light blueprint."""
|
||||
|
@ -192,3 +201,13 @@ async def test_motion_light(hass):
|
|||
|
||||
assert len(turn_on_calls) == 3
|
||||
assert len(turn_off_calls) == 1
|
||||
|
||||
# Verify trigger works
|
||||
await hass.services.async_call(
|
||||
"automation",
|
||||
"trigger",
|
||||
{"entity_id": "automation.automation_0"},
|
||||
)
|
||||
for _ in range(25):
|
||||
await asyncio.sleep(0)
|
||||
assert len(turn_on_calls) == 4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue