Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.google_assistant_sdk.helpers Namespace Reference

Classes

class  CommandResponse
 
class  GoogleAssistantSDKAudioView
 
class  InMemoryStorage
 

Functions

list[CommandResponseasync_send_text_commands (HomeAssistant hass, list[str] commands, list[str]|None media_players=None)
 
str best_matching_language_code (HomeAssistant hass, str assist_language, str|None agent_language=None)
 
str default_language_code (HomeAssistant hass)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
dictionary DEFAULT_LANGUAGE_CODES
 

Detailed Description

Helper classes for Google Assistant SDK integration.

Function Documentation

◆ async_send_text_commands()

list[CommandResponse] homeassistant.components.google_assistant_sdk.helpers.async_send_text_commands ( HomeAssistant  hass,
list[str]  commands,
list[str] | None   media_players = None 
)
Send text commands to Google Assistant Service.

Definition at line 60 of file helpers.py.

◆ best_matching_language_code()

str homeassistant.components.google_assistant_sdk.helpers.best_matching_language_code ( HomeAssistant  hass,
str  assist_language,
str | None   agent_language = None 
)
Get the best matching language, based on the preferred assist language and the configured agent language.

Definition at line 116 of file helpers.py.

◆ default_language_code()

str homeassistant.components.google_assistant_sdk.helpers.default_language_code ( HomeAssistant  hass)
Get default language code based on Home Assistant config.

Definition at line 108 of file helpers.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.google_assistant_sdk.helpers._LOGGER = logging.getLogger(__name__)
private

Definition at line 39 of file helpers.py.

◆ DEFAULT_LANGUAGE_CODES

dictionary homeassistant.components.google_assistant_sdk.helpers.DEFAULT_LANGUAGE_CODES
Initial value:
1 = {
2  "de": "de-DE",
3  "en": "en-US",
4  "es": "es-ES",
5  "fr": "fr-FR",
6  "it": "it-IT",
7  "ja": "ja-JP",
8  "ko": "ko-KR",
9  "pt": "pt-BR",
10 }

Definition at line 41 of file helpers.py.