mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Wait for conversation test init (#121464)
* Wait for conversation test init * typo
This commit is contained in:
parent
6129a37bb0
commit
8a28cbe9e2
@ -137,6 +137,7 @@ async def test_http_processing_intent_entity_added_removed(
|
|||||||
"light", "demo", "1234", suggested_object_id="kitchen"
|
"light", "demo", "1234", suggested_object_id="kitchen"
|
||||||
)
|
)
|
||||||
entity_registry.async_update_entity("light.kitchen", aliases={"my cool light"})
|
entity_registry.async_update_entity("light.kitchen", aliases={"my cool light"})
|
||||||
|
await hass.async_block_till_done()
|
||||||
hass.states.async_set("light.kitchen", "off")
|
hass.states.async_set("light.kitchen", "off")
|
||||||
|
|
||||||
calls = async_mock_service(hass, LIGHT_DOMAIN, "turn_on")
|
calls = async_mock_service(hass, LIGHT_DOMAIN, "turn_on")
|
||||||
@ -274,6 +275,7 @@ async def test_http_processing_intent_entity_renamed(
|
|||||||
LIGHT_DOMAIN,
|
LIGHT_DOMAIN,
|
||||||
{LIGHT_DOMAIN: [{"platform": "test"}]},
|
{LIGHT_DOMAIN: [{"platform": "test"}]},
|
||||||
)
|
)
|
||||||
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
calls = async_mock_service(hass, LIGHT_DOMAIN, "turn_on")
|
calls = async_mock_service(hass, LIGHT_DOMAIN, "turn_on")
|
||||||
client = await hass_client()
|
client = await hass_client()
|
||||||
@ -363,6 +365,7 @@ async def test_http_processing_intent_entity_exposed(
|
|||||||
)
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
entity_registry.async_update_entity("light.kitchen", aliases={"my cool light"})
|
entity_registry.async_update_entity("light.kitchen", aliases={"my cool light"})
|
||||||
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
calls = async_mock_service(hass, LIGHT_DOMAIN, "turn_on")
|
calls = async_mock_service(hass, LIGHT_DOMAIN, "turn_on")
|
||||||
client = await hass_client()
|
client = await hass_client()
|
||||||
@ -391,7 +394,7 @@ async def test_http_processing_intent_entity_exposed(
|
|||||||
|
|
||||||
# Unexpose the entity
|
# Unexpose the entity
|
||||||
expose_entity(hass, "light.kitchen", False)
|
expose_entity(hass, "light.kitchen", False)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done(wait_background_tasks=True)
|
||||||
|
|
||||||
resp = await client.post(
|
resp = await client.post(
|
||||||
"/api/conversation/process", json={"text": "turn on kitchen light"}
|
"/api/conversation/process", json={"text": "turn on kitchen light"}
|
||||||
@ -1157,6 +1160,7 @@ async def test_ws_hass_agent_debug(
|
|||||||
aliases={"my cool light"},
|
aliases={"my cool light"},
|
||||||
area_id=kitchen_area.id,
|
area_id=kitchen_area.id,
|
||||||
)
|
)
|
||||||
|
await hass.async_block_till_done()
|
||||||
hass.states.async_set("light.kitchen", "off")
|
hass.states.async_set("light.kitchen", "off")
|
||||||
|
|
||||||
on_calls = async_mock_service(hass, LIGHT_DOMAIN, "turn_on")
|
on_calls = async_mock_service(hass, LIGHT_DOMAIN, "turn_on")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user