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

Classes

class  AbstractConfig
 
class  GoogleEntity
 
class  RequestData
 

Functions

tuple[ er.RegistryEntry|None, dr.DeviceEntry|None, ar.AreaEntry|None,] _get_registry_entries (HomeAssistant hass, str entity_id)
 
list[GoogleEntityasync_get_entities (HomeAssistant hass, AbstractConfig config)
 
GoogleEntity|None async_get_google_entity_if_supported (HomeAssistant hass, AbstractConfig config, State state)
 
GoogleEntity|None async_get_google_entity_if_supported_cached (HomeAssistant hass, AbstractConfig config, State state)
 
def deep_update (target, source)
 
def get_google_type (domain, device_class)
 
list[type[trait._Trait]] supported_traits_for_state (State state)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 LOCAL_SDK_MIN_VERSION = AwesomeVersion("2.1.5")
 
string LOCAL_SDK_VERSION_HEADER = "HA-Cloud-Version"
 
int SYNC_DELAY = 15
 

Detailed Description

Helper classes for Google Assistant integration.

Function Documentation

◆ _get_registry_entries()

tuple[ er.RegistryEntry | None, dr.DeviceEntry | None, ar.AreaEntry | None, ] homeassistant.components.google_assistant.helpers._get_registry_entries ( HomeAssistant  hass,
str   entity_id 
)
private
Get registry entries.

Definition at line 60 of file helpers.py.

◆ async_get_entities()

list[GoogleEntity] homeassistant.components.google_assistant.helpers.async_get_entities ( HomeAssistant  hass,
AbstractConfig   config 
)
Return all entities that are supported by Google.

Definition at line 796 of file helpers.py.

◆ async_get_google_entity_if_supported()

GoogleEntity | None homeassistant.components.google_assistant.helpers.async_get_google_entity_if_supported ( HomeAssistant  hass,
AbstractConfig  config,
State   state 
)
Return a GoogleEntity if entity is supported.

This function will update the cache, but it does not check the cache first.

Definition at line 781 of file helpers.py.

◆ async_get_google_entity_if_supported_cached()

GoogleEntity | None homeassistant.components.google_assistant.helpers.async_get_google_entity_if_supported_cached ( HomeAssistant  hass,
AbstractConfig  config,
State   state 
)
Return a GoogleEntity if entity is supported checking the cache first.

This function will check the cache, and call async_get_google_entity_if_supported
if the entity is not in the cache, which will update the cache.

Definition at line 761 of file helpers.py.

◆ deep_update()

def homeassistant.components.google_assistant.helpers.deep_update (   target,
  source 
)
Update a nested dictionary with another nested dictionary.

Definition at line 750 of file helpers.py.

◆ get_google_type()

def homeassistant.components.google_assistant.helpers.get_google_type (   domain,
  device_class 
)
Google type based on domain and device class.

Definition at line 491 of file helpers.py.

◆ supported_traits_for_state()

list[type[trait._Trait]] homeassistant.components.google_assistant.helpers.supported_traits_for_state ( State  state)
Return all supported traits for state.

Definition at line 499 of file helpers.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 54 of file helpers.py.

◆ LOCAL_SDK_MIN_VERSION

homeassistant.components.google_assistant.helpers.LOCAL_SDK_MIN_VERSION = AwesomeVersion("2.1.5")

Definition at line 56 of file helpers.py.

◆ LOCAL_SDK_VERSION_HEADER

string homeassistant.components.google_assistant.helpers.LOCAL_SDK_VERSION_HEADER = "HA-Cloud-Version"

Definition at line 55 of file helpers.py.

◆ SYNC_DELAY

int homeassistant.components.google_assistant.helpers.SYNC_DELAY = 15

Definition at line 53 of file helpers.py.