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
|
@ -1353,7 +1353,7 @@ def async_capture_events(hass: HomeAssistant, event_name: str) -> list[Event]:
|
|||
def capture_events(event: Event) -> None:
|
||||
events.append(event)
|
||||
|
||||
hass.bus.async_listen(event_name, capture_events)
|
||||
hass.bus.async_listen(event_name, capture_events, run_immediately=True)
|
||||
|
||||
return events
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue