Google assistant storage of connected agents (#29158)

* Make async_report_state take agent_user_id

* Attempt to store synced agents

* Drop now not needed initialization

* Make sure cloud uses the all sync on changed preferences

* Some more places to use all version of sync

* Get the agent_user_id from the request context if available

* Minor cleanup

* Remove the old fixed agent_user_id for cloud

Instead pass along cloud_user where appropriate.

* async_delay_save takes a function

* Adjust test for delayed store

* Remove unused save function

* Add login check.
This commit is contained in:
Joakim Plate authored and Paulus Schoutsen committed 2019-12-02 22:05:59 -08:00
1 parent 434b783b4c
commit 2569c4ae37
16 files changed
+260 -83

No files matched your search

+1 -1
View File
@@ -175,7 +175,7 @@ class GoogleActionsSyncView(HomeAssistantView):
hass = request.app["hass"]
cloud: Cloud = hass.data[DOMAIN]
gconf = await cloud.client.get_google_config()
status = await gconf.async_sync_entities(gconf.agent_user_id)
status = await gconf.async_sync_entities(gconf.cloud_user)
return self.json({}, status_code=status)