Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.cloud Namespace Reference

Namespaces

 
 alexa_config
 
 assist_pipeline
 
 binary_sensor
 
 client
 
 config_flow
 
 const
 
 google_config
 
 http_api
 
 prefs
 
 repairs
 
 stt
 
 subscription
 
 system_health
 
 tts
 

Classes

class  CloudConnectionState
 
class  CloudNotAvailable
 
class  CloudNotConnected
 

Functions

None _remote_handle_prefs_updated (Cloud[CloudClient] cloud)
 
None _setup_services (HomeAssistant hass, CloudPreferences prefs)
 
bool async_active_subscription (HomeAssistant hass)
 
str async_create_cloudhook (HomeAssistant hass, str webhook_id)
 
None async_delete_cloudhook (HomeAssistant hass, str webhook_id)
 
str async_get_or_create_cloudhook (HomeAssistant hass, str webhook_id)
 
bool async_is_connected (HomeAssistant hass)
 
bool async_is_logged_in (HomeAssistant hass)
 
Callable[[], None] async_listen_connection_change (HomeAssistant hass, Callable[[CloudConnectionState], Awaitable[None]|None] target)
 
str async_remote_ui_url (HomeAssistant hass)
 
bool async_setup (HomeAssistant hass, ConfigType config)
 
bool async_setup_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_unload_entry (HomeAssistant hass, ConfigEntry entry)
 

Variables

 ALEXA_ENTITY_SCHEMA
 
 ALEXA_SCHEMA
 
 ASSISTANT_SCHEMA
 
 CONFIG_SCHEMA
 
 DEFAULT_MODE = MODE_PROD
 
 GACTIONS_SCHEMA
 
 GOOGLE_ENTITY_SCHEMA
 
list PLATFORMS = [Platform.BINARY_SENSOR, Platform.STT, Platform.TTS]
 
string SERVICE_REMOTE_CONNECT = "remote_connect"
 
string SERVICE_REMOTE_DISCONNECT = "remote_disconnect"
 
int STARTUP_REPAIR_DELAY = 1
 

Detailed Description

Component to integrate the Home Assistant cloud.

Function Documentation

◆ _remote_handle_prefs_updated()

None homeassistant.components.cloud._remote_handle_prefs_updated ( Cloud[CloudClient cloud)
private
Handle remote preferences updated.

Definition at line 352 of file __init__.py.

◆ _setup_services()

None homeassistant.components.cloud._setup_services ( HomeAssistant  hass,
CloudPreferences  prefs 
)
private
Set up services for cloud component.

Definition at line 389 of file __init__.py.

◆ async_active_subscription()

bool homeassistant.components.cloud.async_active_subscription ( HomeAssistant  hass)
Test if user has an active subscription.

Definition at line 180 of file __init__.py.

◆ async_create_cloudhook()

str homeassistant.components.cloud.async_create_cloudhook ( HomeAssistant  hass,
str  webhook_id 
)
Create a cloudhook.

Definition at line 202 of file __init__.py.

◆ async_delete_cloudhook()

None homeassistant.components.cloud.async_delete_cloudhook ( HomeAssistant  hass,
str  webhook_id 
)
Delete a cloudhook.

Definition at line 217 of file __init__.py.

◆ async_get_or_create_cloudhook()

str homeassistant.components.cloud.async_get_or_create_cloudhook ( HomeAssistant  hass,
str  webhook_id 
)
Get or create a cloudhook.

Definition at line 185 of file __init__.py.

◆ async_is_connected()

bool homeassistant.components.cloud.async_is_connected ( HomeAssistant  hass)
Test if connected to the cloud.

Definition at line 164 of file __init__.py.

◆ async_is_logged_in()

bool homeassistant.components.cloud.async_is_logged_in ( HomeAssistant  hass)
Test if user is logged in.

Note: This returns True even if not currently connected to the cloud.

Definition at line 154 of file __init__.py.

◆ async_listen_connection_change()

Callable[[], None] homeassistant.components.cloud.async_listen_connection_change ( HomeAssistant  hass,
Callable[[CloudConnectionState], Awaitable[None] | None]  target 
)
Notify on connection state changes.

Definition at line 170 of file __init__.py.

◆ async_remote_ui_url()

str homeassistant.components.cloud.async_remote_ui_url ( HomeAssistant  hass)
Get the remote UI URL.

Definition at line 227 of file __init__.py.

◆ async_setup()

bool homeassistant.components.cloud.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Initialize the Home Assistant cloud.

Definition at line 241 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.cloud.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up a config entry.

Definition at line 374 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.cloud.async_unload_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Unload a config entry.

Definition at line 383 of file __init__.py.

Variable Documentation

◆ ALEXA_ENTITY_SCHEMA

homeassistant.components.cloud.ALEXA_ENTITY_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_DESCRIPTION): cv.string,
4  vol.Optional(alexa.CONF_DISPLAY_CATEGORIES): cv.string,
5  vol.Optional(CONF_NAME): cv.string,
6  }
7 )

Definition at line 81 of file __init__.py.

◆ ALEXA_SCHEMA

homeassistant.components.cloud.ALEXA_SCHEMA
Initial value:
1 = ASSISTANT_SCHEMA.extend(
2  {vol.Optional(CONF_ENTITY_CONFIG): {cv.entity_id: ALEXA_ENTITY_SCHEMA}}
3 )

Definition at line 101 of file __init__.py.

◆ ASSISTANT_SCHEMA

homeassistant.components.cloud.ASSISTANT_SCHEMA
Initial value:
1 = vol.Schema(
2  {vol.Optional(CONF_FILTER, default=dict): entityfilter.FILTER_SCHEMA}
3 )

Definition at line 97 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.cloud.CONFIG_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  DOMAIN: vol.Schema(
4  {
5  vol.Optional(CONF_MODE, default=DEFAULT_MODE): vol.In(
6  [MODE_DEV, MODE_PROD]
7  ),
8  vol.Optional(CONF_COGNITO_CLIENT_ID): str,
9  vol.Optional(CONF_USER_POOL_ID): str,
10  vol.Optional(CONF_REGION): str,
11  vol.Optional(CONF_ALEXA): ALEXA_SCHEMA,
12  vol.Optional(CONF_GOOGLE_ACTIONS): GACTIONS_SCHEMA,
13  vol.Optional(CONF_ACCOUNT_LINK_SERVER): str,
14  vol.Optional(CONF_ACCOUNTS_SERVER): str,
15  vol.Optional(CONF_ACME_SERVER): str,
16  vol.Optional(CONF_ALEXA_SERVER): str,
17  vol.Optional(CONF_CLOUDHOOK_SERVER): str,
18  vol.Optional(CONF_RELAYER_SERVER): str,
19  vol.Optional(CONF_REMOTESTATE_SERVER): str,
20  vol.Optional(CONF_THINGTALK_SERVER): str,
21  vol.Optional(CONF_SERVICEHANDLERS_SERVER): str,
22  }
23  )
24  },
25  extra=vol.ALLOW_EXTRA,
26 )

Definition at line 109 of file __init__.py.

◆ DEFAULT_MODE

homeassistant.components.cloud.DEFAULT_MODE = MODE_PROD

Definition at line 68 of file __init__.py.

◆ GACTIONS_SCHEMA

homeassistant.components.cloud.GACTIONS_SCHEMA
Initial value:
1 = ASSISTANT_SCHEMA.extend(
2  {vol.Optional(CONF_ENTITY_CONFIG): {cv.entity_id: GOOGLE_ENTITY_SCHEMA}}
3 )

Definition at line 105 of file __init__.py.

◆ GOOGLE_ENTITY_SCHEMA

homeassistant.components.cloud.GOOGLE_ENTITY_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_NAME): cv.string,
4  vol.Optional(CONF_ALIASES): vol.All(cv.ensure_list, [cv.string]),
5  vol.Optional(google_assistant.CONF_ROOM_HINT): cv.string,
6  }
7 )

Definition at line 89 of file __init__.py.

◆ PLATFORMS

list homeassistant.components.cloud.PLATFORMS = [Platform.BINARY_SENSOR, Platform.STT, Platform.TTS]

Definition at line 70 of file __init__.py.

◆ SERVICE_REMOTE_CONNECT

string homeassistant.components.cloud.SERVICE_REMOTE_CONNECT = "remote_connect"

Definition at line 72 of file __init__.py.

◆ SERVICE_REMOTE_DISCONNECT

string homeassistant.components.cloud.SERVICE_REMOTE_DISCONNECT = "remote_disconnect"

Definition at line 73 of file __init__.py.

◆ STARTUP_REPAIR_DELAY

int homeassistant.components.cloud.STARTUP_REPAIR_DELAY = 1

Definition at line 79 of file __init__.py.