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

Public Member Functions

None __init__ (self, HomeAssistant hass, dict config, str cloud_user, CloudPreferences prefs, Cloud[CloudClient] cloud)
 
str|None async_get_access_token (self)
 
None async_initialize (self)
 
None async_invalidate_access_token (self)
 
bool async_sync_entities (self)
 
bool enabled (self)
 
str|URL|None endpoint (self)
 
dict[str, Any] entity_config (self)
 
str locale (self)
 
bool should_expose (self, str entity_id)
 
bool should_report_state (self)
 
bool supports_auth (self)
 
str user_identifier (self)
 

Private Member Functions

None _async_exposed_entities_updated (self)
 
None _async_prefs_updated (self, CloudPreferences prefs)
 
None _handle_entity_registry_updated (self, Event[er.EventEntityRegistryUpdatedData] event)
 
None _migrate_alexa_entity_settings_v1 (self)
 
bool _should_expose_legacy (self, str entity_id)
 
bool _sync_helper (self, list[str] to_update, list[str] to_remove)
 
None _sync_prefs (self, datetime _now)
 

Private Attributes

 _alexa_sync_unsub
 
 _cloud
 
 _cloud_user
 
 _config
 
 _cur_entity_prefs
 
 _endpoint
 
 _prefs
 
 _token
 
 _token_valid
 

Detailed Description

Alexa Configuration.

Definition at line 132 of file alexa_config.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.cloud.alexa_config.CloudAlexaConfig.__init__ (   self,
HomeAssistant  hass,
dict  config,
str  cloud_user,
CloudPreferences  prefs,
Cloud[CloudClient cloud 
)
Initialize the Alexa config.

Definition at line 135 of file alexa_config.py.

Member Function Documentation

◆ _async_exposed_entities_updated()

None homeassistant.components.cloud.alexa_config.CloudAlexaConfig._async_exposed_entities_updated (   self)
private
Handle updated preferences.

Definition at line 396 of file alexa_config.py.

◆ _async_prefs_updated()

None homeassistant.components.cloud.alexa_config.CloudAlexaConfig._async_prefs_updated (   self,
CloudPreferences  prefs 
)
private
Handle updated preferences.

Definition at line 349 of file alexa_config.py.

◆ _handle_entity_registry_updated()

None homeassistant.components.cloud.alexa_config.CloudAlexaConfig._handle_entity_registry_updated (   self,
Event[er.EventEntityRegistryUpdatedData]   event 
)
private
Handle when entity registry updated.

Definition at line 520 of file alexa_config.py.

◆ _migrate_alexa_entity_settings_v1()

None homeassistant.components.cloud.alexa_config.CloudAlexaConfig._migrate_alexa_entity_settings_v1 (   self)
private
Migrate alexa entity settings to entity registry options.

Definition at line 202 of file alexa_config.py.

◆ _should_expose_legacy()

bool homeassistant.components.cloud.alexa_config.CloudAlexaConfig._should_expose_legacy (   self,
str  entity_id 
)
private
If an entity should be exposed.

Definition at line 273 of file alexa_config.py.

◆ _sync_helper()

bool homeassistant.components.cloud.alexa_config.CloudAlexaConfig._sync_helper (   self,
list[str]  to_update,
list[str]  to_remove 
)
private
Sync entities to Alexa.

Return boolean if it was successful.

Definition at line 478 of file alexa_config.py.

◆ _sync_prefs()

None homeassistant.components.cloud.alexa_config.CloudAlexaConfig._sync_prefs (   self,
datetime  _now 
)
private
Sync the updated preferences to Alexa.

Definition at line 406 of file alexa_config.py.

◆ async_get_access_token()

str | None homeassistant.components.cloud.alexa_config.CloudAlexaConfig.async_get_access_token (   self)
Get an access token.

Definition at line 319 of file alexa_config.py.

◆ async_initialize()

None homeassistant.components.cloud.alexa_config.CloudAlexaConfig.async_initialize (   self)
Initialize the Alexa config.

Definition at line 219 of file alexa_config.py.

◆ async_invalidate_access_token()

None homeassistant.components.cloud.alexa_config.CloudAlexaConfig.async_invalidate_access_token (   self)
Invalidate access token.

Definition at line 315 of file alexa_config.py.

◆ async_sync_entities()

bool homeassistant.components.cloud.alexa_config.CloudAlexaConfig.async_sync_entities (   self)
Sync all entities to Alexa.

Definition at line 458 of file alexa_config.py.

◆ enabled()

bool homeassistant.components.cloud.alexa_config.CloudAlexaConfig.enabled (   self)
Return if Alexa is enabled.

Definition at line 156 of file alexa_config.py.

◆ endpoint()

str | URL | None homeassistant.components.cloud.alexa_config.CloudAlexaConfig.endpoint (   self)
Endpoint for report state.

Definition at line 179 of file alexa_config.py.

◆ entity_config()

dict[str, Any] homeassistant.components.cloud.alexa_config.CloudAlexaConfig.entity_config (   self)
Return entity config.

Definition at line 193 of file alexa_config.py.

◆ locale()

str homeassistant.components.cloud.alexa_config.CloudAlexaConfig.locale (   self)
Return config locale.

Definition at line 187 of file alexa_config.py.

◆ should_expose()

bool homeassistant.components.cloud.alexa_config.CloudAlexaConfig.should_expose (   self,
str  entity_id 
)
If an entity should be exposed.

Definition at line 304 of file alexa_config.py.

◆ should_report_state()

bool homeassistant.components.cloud.alexa_config.CloudAlexaConfig.should_report_state (   self)
Return if states should be proactively reported.

Definition at line 170 of file alexa_config.py.

◆ supports_auth()

bool homeassistant.components.cloud.alexa_config.CloudAlexaConfig.supports_auth (   self)
Return if config supports auth.

Definition at line 165 of file alexa_config.py.

◆ user_identifier()

str homeassistant.components.cloud.alexa_config.CloudAlexaConfig.user_identifier (   self)
Return an identifier for the user that represents this config.

Definition at line 198 of file alexa_config.py.

Member Data Documentation

◆ _alexa_sync_unsub

homeassistant.components.cloud.alexa_config.CloudAlexaConfig._alexa_sync_unsub
private

Definition at line 357 of file alexa_config.py.

◆ _cloud

homeassistant.components.cloud.alexa_config.CloudAlexaConfig._cloud
private

Definition at line 148 of file alexa_config.py.

◆ _cloud_user

homeassistant.components.cloud.alexa_config.CloudAlexaConfig._cloud_user
private

Definition at line 146 of file alexa_config.py.

◆ _config

homeassistant.components.cloud.alexa_config.CloudAlexaConfig._config
private

Definition at line 145 of file alexa_config.py.

◆ _cur_entity_prefs

homeassistant.components.cloud.alexa_config.CloudAlexaConfig._cur_entity_prefs
private

Definition at line 151 of file alexa_config.py.

◆ _endpoint

homeassistant.components.cloud.alexa_config.CloudAlexaConfig._endpoint
private

Definition at line 345 of file alexa_config.py.

◆ _prefs

homeassistant.components.cloud.alexa_config.CloudAlexaConfig._prefs
private

Definition at line 147 of file alexa_config.py.

◆ _token

homeassistant.components.cloud.alexa_config.CloudAlexaConfig._token
private

Definition at line 149 of file alexa_config.py.

◆ _token_valid

homeassistant.components.cloud.alexa_config.CloudAlexaConfig._token_valid
private

Definition at line 317 of file alexa_config.py.


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