Private Member Functions | |
| bool|None | _2fa_disabled_legacy (self, str entity_id) |
| None | _async_exposed_entities_updated (self) |
| None | _async_prefs_updated (self, CloudPreferences prefs) |
| HTTPStatus|int | _async_request_sync_devices (self, str agent_user_id) |
| None | _handle_device_registry_updated (self, Event[dr.EventDeviceRegistryUpdatedData] event) |
| None | _handle_entity_registry_updated (self, Event[er.EventEntityRegistryUpdatedData] event) |
| None | _migrate_google_entity_settings_v1 (self) |
| bool | _should_expose_entity_id (self, str entity_id) |
| bool | _should_expose_legacy (self, str entity_id) |
Private Attributes | |
| _cloud | |
| _config | |
| _prefs | |
| _sync_entities_lock | |
| _user | |
Additional Inherited Members | |
Public Attributes inherited from homeassistant.components.google_assistant.helpers.AbstractConfig | |
| hass | |
Static Public Attributes inherited from homeassistant.components.google_assistant.helpers.AbstractConfig | |
| None | |
HA Cloud Configuration for Google Assistant.
Definition at line 130 of file google_config.py.
| None homeassistant.components.cloud.google_config.CloudGoogleConfig.__init__ | ( | self, | |
| HomeAssistant | hass, | ||
| dict[str, Any] | config, | ||
| str | cloud_user, | ||
| CloudPreferences | prefs, | ||
| Cloud[CloudClient] | cloud | ||
| ) |
Initialize the Google config.
Definition at line 133 of file google_config.py.
|
private |
If an entity should be checked for 2FA.
Definition at line 348 of file google_config.py.
|
private |
Handle updated preferences.
Definition at line 451 of file google_config.py.
|
private |
Handle updated preferences.
Definition at line 411 of file google_config.py.
|
private |
Trigger a sync with Google.
Reimplemented from homeassistant.components.google_assistant.helpers.AbstractConfig.
Definition at line 374 of file google_config.py.
|
private |
Handle when device registry updated.
Definition at line 481 of file google_config.py.
|
private |
Handle when entity registry updated.
Definition at line 456 of file google_config.py.
|
private |
Migrate Google entity settings to entity registry options.
Definition at line 190 of file google_config.py.
|
private |
If an entity should be exposed.
Definition at line 314 of file google_config.py.
|
private |
If an entity ID should be exposed.
Definition at line 282 of file google_config.py.
| str homeassistant.components.cloud.google_config.CloudGoogleConfig.agent_user_id | ( | self | ) |
Return Agent User Id to use for query responses.
Definition at line 325 of file google_config.py.
| None homeassistant.components.cloud.google_config.CloudGoogleConfig.async_connect_agent_user | ( | self, | |
| str | agent_user_id | ||
| ) |
Add a synced and known agent_user_id. Called before sending a sync response to Google.
Reimplemented from homeassistant.components.google_assistant.helpers.AbstractConfig.
Definition at line 383 of file google_config.py.
| None homeassistant.components.cloud.google_config.CloudGoogleConfig.async_disconnect_agent_user | ( | self, | |
| str | agent_user_id | ||
| ) |
Turn off report state and disable further state reporting. Called when: - The user disconnects their account from Google. - When the cloud configuration is initialized - When sync entities fails with 404
Reimplemented from homeassistant.components.google_assistant.helpers.AbstractConfig.
Definition at line 390 of file google_config.py.
| tuple homeassistant.components.cloud.google_config.CloudGoogleConfig.async_get_agent_users | ( | self | ) |
Return known agent users.
Reimplemented from homeassistant.components.google_assistant.helpers.AbstractConfig.
Definition at line 401 of file google_config.py.
| None homeassistant.components.cloud.google_config.CloudGoogleConfig.async_initialize | ( | self | ) |
Perform async initialization of config.
Reimplemented from homeassistant.components.google_assistant.helpers.AbstractConfig.
Definition at line 215 of file google_config.py.
| None homeassistant.components.cloud.google_config.CloudGoogleConfig.async_report_state | ( | self, | |
| Any | message, | ||
| str | agent_user_id, | ||
| str | None | event_id = None |
||
| ) |
Send a state report to Google.
Definition at line 365 of file google_config.py.
| str homeassistant.components.cloud.google_config.CloudGoogleConfig.cloud_user | ( | self | ) |
Return Cloud User account.
Definition at line 186 of file google_config.py.
| bool homeassistant.components.cloud.google_config.CloudGoogleConfig.enabled | ( | self | ) |
Return if Google is enabled.
Reimplemented from homeassistant.components.google_assistant.helpers.AbstractConfig.
Definition at line 150 of file google_config.py.
| dict[str, Any] homeassistant.components.cloud.google_config.CloudGoogleConfig.entity_config | ( | self | ) |
Return entity config.
Reimplemented from homeassistant.components.google_assistant.helpers.AbstractConfig.
Definition at line 159 of file google_config.py.
| str homeassistant.components.cloud.google_config.CloudGoogleConfig.get_agent_user_id_from_context | ( | self, | |
| Any | context | ||
| ) |
Get agent user ID making request.
Definition at line 334 of file google_config.py.
| str | None homeassistant.components.cloud.google_config.CloudGoogleConfig.get_agent_user_id_from_webhook | ( | self, | |
| str | webhook_id | ||
| ) |
Map webhook ID to a Google agent user ID. Return None if no agent user id is found for the webhook_id.
Definition at line 338 of file google_config.py.
| str homeassistant.components.cloud.google_config.CloudGoogleConfig.get_local_user_id | ( | self, | |
| Any | webhook_id | ||
| ) |
Map webhook ID to a Home Assistant user ID. Any action initiated by Google Assistant via the local SDK will be attributed to the returned user ID.
Definition at line 177 of file google_config.py.
| str homeassistant.components.cloud.google_config.CloudGoogleConfig.get_local_webhook_id | ( | self, | |
| Any | agent_user_id | ||
| ) |
Return the webhook ID to be used for actions for a given agent user id via the local SDK.
Definition at line 173 of file google_config.py.
| bool homeassistant.components.cloud.google_config.CloudGoogleConfig.has_registered_user_agent | ( | self | ) |
Return if we have a Agent User Id registered.
Definition at line 330 of file google_config.py.
| str | None homeassistant.components.cloud.google_config.CloudGoogleConfig.secure_devices_pin | ( | self | ) |
Return entity config.
Reimplemented from homeassistant.components.google_assistant.helpers.AbstractConfig.
Definition at line 164 of file google_config.py.
| bool homeassistant.components.cloud.google_config.CloudGoogleConfig.should_2fa | ( | self, | |
| State | state | ||
| ) |
If an entity should be checked for 2FA.
Definition at line 354 of file google_config.py.
| bool homeassistant.components.cloud.google_config.CloudGoogleConfig.should_expose | ( | self, | |
| State | state | ||
| ) |
If a state object should be exposed.
Definition at line 278 of file google_config.py.
| bool homeassistant.components.cloud.google_config.CloudGoogleConfig.should_report_state | ( | self | ) |
Return if states should be proactively reported.
Reimplemented from homeassistant.components.google_assistant.helpers.AbstractConfig.
Definition at line 169 of file google_config.py.
|
private |
Definition at line 146 of file google_config.py.
|
private |
Definition at line 143 of file google_config.py.
|
private |
Definition at line 145 of file google_config.py.
|
private |
Definition at line 147 of file google_config.py.
|
private |
Definition at line 144 of file google_config.py.