From fd5b92b2fb777d3ff9e0b6ef32d338538be330ae Mon Sep 17 00:00:00 2001 From: edif30 Date: Sat, 8 Dec 2018 20:39:51 -0500 Subject: [PATCH] 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. --- homeassistant/components/google_assistant/__init__.py | 2 +- homeassistant/components/google_assistant/services.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/google_assistant/__init__.py b/homeassistant/components/google_assistant/__init__.py index bf0c72ec1c8..c0dff15d888 100644 --- a/homeassistant/components/google_assistant/__init__.py +++ b/homeassistant/components/google_assistant/__init__.py @@ -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( diff --git a/homeassistant/components/google_assistant/services.yaml b/homeassistant/components/google_assistant/services.yaml index 7d3af71ac2b..33a52c8ef60 100644 --- a/homeassistant/components/google_assistant/services.yaml +++ b/homeassistant/components/google_assistant/services.yaml @@ -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."