Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.cloud.client.CloudClient Class Reference
Inheritance diagram for homeassistant.components.cloud.client.CloudClient:
[legend]
Collaboration diagram for homeassistant.components.cloud.client.CloudClient:
[legend]

Public Member Functions

None __init__ (self, HomeAssistant hass, CloudPreferences prefs, aiohttp.ClientSession websession, dict[str, Any] alexa_user_config, dict[str, Any] google_user_config)
 
aiohttp.web.AppRunner|None aiohttp_runner (self)
 
dict[Any, Any] async_alexa_message (self, dict[Any, Any] payload)
 
None async_cloud_connect_update (self, bool connect)
 
dict[str, Any] async_cloud_connection_info (self, dict[str, Any] payload)
 
None async_cloudhooks_update (self, dict[str, dict[str, str|bool]] data)
 
None async_create_repair_issue (self, str identifier, str translation_key, *dict[str, str]|None placeholders=None, Literal["error", "warning"] severity="warning")
 
dict[Any, Any] async_google_message (self, dict[Any, Any] payload)
 
None async_system_message (self, dict[Any, Any]|None payload)
 
dict[Any, Any] async_webhook_message (self, dict[Any, Any] payload)
 
Path base_path (self)
 
str client_name (self)
 
None cloud_connected (self)
 
None cloud_disconnected (self)
 
None cloud_started (self)
 
None cloud_stopped (self)
 
dict[str, dict[str, str|bool]] cloudhooks (self)
 
None dispatcher_message (self, str identifier, Any data=None)
 
alexa_config.CloudAlexaConfig get_alexa_config (self)
 
google_config.CloudGoogleConfig get_google_config (self)
 
None logout_cleanups (self)
 
asyncio.AbstractEventLoop loop (self)
 
CloudPreferences prefs (self)
 
str|None relayer_region (self)
 
bool remote_autostart (self)
 
None user_message (self, str identifier, str title, str message)
 
aiohttp.ClientSession websession (self)
 

Public Attributes

 alexa_user_config
 
 google_user_config
 

Private Attributes

 _alexa_config
 
 _alexa_config_init_lock
 
 _cloud_ice_servers_listener
 
 _google_config
 
 _google_config_init_lock
 
 _hass
 
 _prefs
 
 _relayer_region
 
 _websession
 

Detailed Description

Interface class for Home Assistant Cloud.

Definition at line 44 of file client.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.cloud.client.CloudClient.__init__ (   self,
HomeAssistant  hass,
CloudPreferences  prefs,
aiohttp.ClientSession  websession,
dict[str, Any]  alexa_user_config,
dict[str, Any]  google_user_config 
)
Initialize client interface to Cloud.

Definition at line 47 of file client.py.

Member Function Documentation

◆ aiohttp_runner()

aiohttp.web.AppRunner | None homeassistant.components.cloud.client.CloudClient.aiohttp_runner (   self)
Return client webinterface aiohttp application.

Definition at line 89 of file client.py.

◆ async_alexa_message()

dict[Any, Any] homeassistant.components.cloud.client.CloudClient.async_alexa_message (   self,
dict[Any, Any]  payload 
)
Process cloud alexa message to client.

Definition at line 311 of file client.py.

◆ async_cloud_connect_update()

None homeassistant.components.cloud.client.CloudClient.async_cloud_connect_update (   self,
bool  connect 
)
Process cloud remote message to client.

Definition at line 289 of file client.py.

◆ async_cloud_connection_info()

dict[str, Any] homeassistant.components.cloud.client.CloudClient.async_cloud_connection_info (   self,
dict[str, Any]   payload 
)
Process cloud connection info message to client.

Definition at line 295 of file client.py.

◆ async_cloudhooks_update()

None homeassistant.components.cloud.client.CloudClient.async_cloudhooks_update (   self,
dict[str, dict[str, str | bool]]   data 
)
Update local list of cloudhooks.

Definition at line 385 of file client.py.

◆ async_create_repair_issue()

None homeassistant.components.cloud.client.CloudClient.async_create_repair_issue (   self,
str  identifier,
str  translation_key,
*dict[str, str] | None   placeholders = None,
Literal["error", "warning"]   severity = "warning" 
)
Create a repair issue.

Definition at line 391 of file client.py.

◆ async_google_message()

dict[Any, Any] homeassistant.components.cloud.client.CloudClient.async_google_message (   self,
dict[Any, Any]  payload 
)
Process cloud google message to client.

Definition at line 323 of file client.py.

◆ async_system_message()

None homeassistant.components.cloud.client.CloudClient.async_system_message (   self,
dict[Any, Any] | None  payload 
)
Handle system messages.

Definition at line 380 of file client.py.

◆ async_webhook_message()

dict[Any, Any] homeassistant.components.cloud.client.CloudClient.async_webhook_message (   self,
dict[Any, Any]  payload 
)
Process cloud webhook message to client.

Definition at line 346 of file client.py.

◆ base_path()

Path homeassistant.components.cloud.client.CloudClient.base_path (   self)
Return path to base dir.

Definition at line 69 of file client.py.

◆ client_name()

str homeassistant.components.cloud.client.CloudClient.client_name (   self)
Return the client name that will be used for API calls.

Definition at line 104 of file client.py.

◆ cloud_connected()

None homeassistant.components.cloud.client.CloudClient.cloud_connected (   self)
When cloud is connected.

Definition at line 157 of file client.py.

◆ cloud_disconnected()

None homeassistant.components.cloud.client.CloudClient.cloud_disconnected (   self)
When cloud disconnected.

Definition at line 250 of file client.py.

◆ cloud_started()

None homeassistant.components.cloud.client.CloudClient.cloud_started (   self)
When cloud is started.

Definition at line 256 of file client.py.

◆ cloud_stopped()

None homeassistant.components.cloud.client.CloudClient.cloud_stopped (   self)
When the cloud is stopped.

Definition at line 259 of file client.py.

◆ cloudhooks()

dict[str, dict[str, str | bool]] homeassistant.components.cloud.client.CloudClient.cloudhooks (   self)
Return list of cloudhooks.

Definition at line 94 of file client.py.

◆ dispatcher_message()

None homeassistant.components.cloud.client.CloudClient.dispatcher_message (   self,
str  identifier,
Any   data = None 
)
Match cloud notification to dispatcher.

Definition at line 284 of file client.py.

◆ get_alexa_config()

alexa_config.CloudAlexaConfig homeassistant.components.cloud.client.CloudClient.get_alexa_config (   self)
Return Alexa config.

Definition at line 113 of file client.py.

◆ get_google_config()

google_config.CloudGoogleConfig homeassistant.components.cloud.client.CloudClient.get_google_config (   self)
Return Google config.

Definition at line 136 of file client.py.

◆ logout_cleanups()

None homeassistant.components.cloud.client.CloudClient.logout_cleanups (   self)
Cleanup some stuff after logout.

Definition at line 262 of file client.py.

◆ loop()

asyncio.AbstractEventLoop homeassistant.components.cloud.client.CloudClient.loop (   self)
Return client loop.

Definition at line 79 of file client.py.

◆ prefs()

CloudPreferences homeassistant.components.cloud.client.CloudClient.prefs (   self)
Return Cloud preferences.

Definition at line 74 of file client.py.

◆ relayer_region()

str | None homeassistant.components.cloud.client.CloudClient.relayer_region (   self)
Return the connected relayer region.

Definition at line 109 of file client.py.

◆ remote_autostart()

bool homeassistant.components.cloud.client.CloudClient.remote_autostart (   self)
Return true if we want start a remote connection.

Definition at line 99 of file client.py.

◆ user_message()

None homeassistant.components.cloud.client.CloudClient.user_message (   self,
str  identifier,
str  title,
str  message 
)
Create a message for user to UI.

Definition at line 279 of file client.py.

◆ websession()

aiohttp.ClientSession homeassistant.components.cloud.client.CloudClient.websession (   self)
Return client session for aiohttp.

Definition at line 84 of file client.py.

Member Data Documentation

◆ _alexa_config

homeassistant.components.cloud.client.CloudClient._alexa_config
private

Definition at line 132 of file client.py.

◆ _alexa_config_init_lock

homeassistant.components.cloud.client.CloudClient._alexa_config_init_lock
private

Definition at line 63 of file client.py.

◆ _cloud_ice_servers_listener

homeassistant.components.cloud.client.CloudClient._cloud_ice_servers_listener
private

Definition at line 215 of file client.py.

◆ _google_config

homeassistant.components.cloud.client.CloudClient._google_config
private

Definition at line 153 of file client.py.

◆ _google_config_init_lock

homeassistant.components.cloud.client.CloudClient._google_config_init_lock
private

Definition at line 64 of file client.py.

◆ _hass

homeassistant.components.cloud.client.CloudClient._hass
private

Definition at line 56 of file client.py.

◆ _prefs

homeassistant.components.cloud.client.CloudClient._prefs
private

Definition at line 57 of file client.py.

◆ _relayer_region

homeassistant.components.cloud.client.CloudClient._relayer_region
private

Definition at line 383 of file client.py.

◆ _websession

homeassistant.components.cloud.client.CloudClient._websession
private

Definition at line 58 of file client.py.

◆ alexa_user_config

homeassistant.components.cloud.client.CloudClient.alexa_user_config

Definition at line 60 of file client.py.

◆ google_user_config

homeassistant.components.cloud.client.CloudClient.google_user_config

Definition at line 59 of file client.py.


The documentation for this class was generated from the following file: