Move request sync logic into GoogleConfig (#28227)
* Move request sync logic into GoogleConfig * Return http status code for request_sync same as cloud * agent_user_id is not optional for async_sync_entities now * No need in checking parameter here * Adjust some things for cloud tests * Adjust some more stuff for cloud tests * Drop uneccessary else * Black required change * Let async_schedule_google_sync take agent_user_id * Assert return value on api call * Test old api key method * Update homeassistant/components/google_assistant/helpers.py Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
parent
5f1b0fb15c
commit
06231e7ac2
8 changed files with 121 additions and 86 deletions
|
@ -174,7 +174,9 @@ class GoogleActionsSyncView(HomeAssistantView):
|
|||
"""Trigger a Google Actions sync."""
|
||||
hass = request.app["hass"]
|
||||
cloud: Cloud = hass.data[DOMAIN]
|
||||
status = await cloud.client.google_config.async_sync_entities()
|
||||
status = await cloud.client.google_config.async_sync_entities(
|
||||
cloud.client.google_config.agent_user_id
|
||||
)
|
||||
return self.json({}, status_code=status)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue