mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Update Google Assistant services description and request sync timeout (#19113)
* Fix google assistant request sync service call * More descriptive services.yaml * Update services.yaml * Update __init__.py * Update request sync service call timeout Change from 5s to 15s to allow Google to respond. 5s was too short. The service would sync but the service call would time out and throw the error.
This commit is contained in:
parent
6e55c2a345
commit
fd5b92b2fb
@ -67,7 +67,7 @@ async def async_setup(hass: HomeAssistant, yaml_config: Dict[str, Any]):
|
||||
"""Handle request sync service calls."""
|
||||
websession = async_get_clientsession(hass)
|
||||
try:
|
||||
with async_timeout.timeout(5, loop=hass.loop):
|
||||
with async_timeout.timeout(15, loop=hass.loop):
|
||||
agent_user_id = call.data.get('agent_user_id') or \
|
||||
call.context.user_id
|
||||
res = await websession.post(
|
||||
|
@ -2,4 +2,4 @@ request_sync:
|
||||
description: Send a request_sync command to Google.
|
||||
fields:
|
||||
agent_user_id:
|
||||
description: Optional. Only needed for automations. Specific Home Assistant user id to sync with Google Assistant. Do not need when you call this service through Home Assistant front end or API. Used in automation script or other place where context.user_id is missing.
|
||||
description: "Optional. Only needed for automations. Specific Home Assistant user id (not username, ID in configuration > users > under username) to sync with Google Assistant. Do not need when you call this service through Home Assistant front end or API. Used in automation script or other place where context.user_id is missing."
|
||||
|
Loading…
x
Reference in New Issue
Block a user