Update service call return values and error handling (#94657)
* Update return signature of service calls * Add timeout error handling in websocket api for service calls * Update recorder tests to remove assertion on service call * Remove timeout behavior and update callers that depend on it today * Fix tests * Add missing else * await coro directly * Fix more tests * Update the intent task to use wait instead of timeout * Remove script service call limits and limit constants * Update tests that depend on service call limits * Use wait instead of wait_for and add test * Update homeassistant/helpers/intent.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> --------- Co-authored-by: Paulus Schoutsen <balloob@gmail.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
950b25bf42
commit
12129e9d21
63 changed files with 388 additions and 434 deletions
|
@ -22,7 +22,7 @@ async def test_buttons(
|
|||
entry = entity_registry.async_get("button.amazon_fire_restart_browser")
|
||||
assert entry
|
||||
assert entry.unique_id == "abcdef-123456-restartApp"
|
||||
assert await hass.services.async_call(
|
||||
await hass.services.async_call(
|
||||
button.DOMAIN,
|
||||
button.SERVICE_PRESS,
|
||||
{ATTR_ENTITY_ID: "button.amazon_fire_restart_browser"},
|
||||
|
@ -33,7 +33,7 @@ async def test_buttons(
|
|||
entry = entity_registry.async_get("button.amazon_fire_reboot_device")
|
||||
assert entry
|
||||
assert entry.unique_id == "abcdef-123456-rebootDevice"
|
||||
assert await hass.services.async_call(
|
||||
await hass.services.async_call(
|
||||
button.DOMAIN,
|
||||
button.SERVICE_PRESS,
|
||||
{ATTR_ENTITY_ID: "button.amazon_fire_reboot_device"},
|
||||
|
@ -44,7 +44,7 @@ async def test_buttons(
|
|||
entry = entity_registry.async_get("button.amazon_fire_bring_to_foreground")
|
||||
assert entry
|
||||
assert entry.unique_id == "abcdef-123456-toForeground"
|
||||
assert await hass.services.async_call(
|
||||
await hass.services.async_call(
|
||||
button.DOMAIN,
|
||||
button.SERVICE_PRESS,
|
||||
{ATTR_ENTITY_ID: "button.amazon_fire_bring_to_foreground"},
|
||||
|
@ -55,7 +55,7 @@ async def test_buttons(
|
|||
entry = entity_registry.async_get("button.amazon_fire_send_to_background")
|
||||
assert entry
|
||||
assert entry.unique_id == "abcdef-123456-toBackground"
|
||||
assert await hass.services.async_call(
|
||||
await hass.services.async_call(
|
||||
button.DOMAIN,
|
||||
button.SERVICE_PRESS,
|
||||
{ATTR_ENTITY_ID: "button.amazon_fire_send_to_background"},
|
||||
|
@ -66,7 +66,7 @@ async def test_buttons(
|
|||
entry = entity_registry.async_get("button.amazon_fire_load_start_url")
|
||||
assert entry
|
||||
assert entry.unique_id == "abcdef-123456-loadStartUrl"
|
||||
assert await hass.services.async_call(
|
||||
await hass.services.async_call(
|
||||
button.DOMAIN,
|
||||
button.SERVICE_PRESS,
|
||||
{ATTR_ENTITY_ID: "button.amazon_fire_load_start_url"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue