Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.google_assistant.helpers.GoogleEntity Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, AbstractConfig config, State state)
 
str __repr__ (self)
 
def async_update (self)
 
def execute (self, data, command_payload)
 
bool is_supported (self)
 
bool might_2fa (self)
 
bool might_2fa_traits (self)
 
dict[str, Any]|None notifications_serialize (self)
 
def query_serialize (self)
 
def reachable_device_serialize (self)
 
def should_expose (self)
 
bool should_expose_local (self)
 
def sync_serialize (self, agent_user_id, instance_uuid)
 
list[trait._Traittraits (self)
 

Public Attributes

 config
 
 entity_id
 
 hass
 
 state
 

Private Attributes

 _traits
 

Static Private Attributes

tuple __slots__ = ("hass", "config", "state", "entity_id", "_traits")
 

Detailed Description

Adaptation of Entity expressed in Google's terms.

Definition at line 521 of file helpers.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.google_assistant.helpers.GoogleEntity.__init__ (   self,
HomeAssistant  hass,
AbstractConfig  config,
State   state 
)
Initialize a Google entity.

Definition at line 526 of file helpers.py.

Member Function Documentation

◆ __repr__()

str homeassistant.components.google_assistant.helpers.GoogleEntity.__repr__ (   self)
Return the representation.

Definition at line 536 of file helpers.py.

◆ async_update()

def homeassistant.components.google_assistant.helpers.GoogleEntity.async_update (   self)
Update the entity with latest info from Home Assistant.

Definition at line 739 of file helpers.py.

◆ execute()

def homeassistant.components.google_assistant.helpers.GoogleEntity.execute (   self,
  data,
  command_payload 
)
Execute a command.

https://developers.google.com/actions/smarthome/create-app#actiondevicesexecute

Definition at line 717 of file helpers.py.

◆ is_supported()

bool homeassistant.components.google_assistant.helpers.GoogleEntity.is_supported (   self)
Return if entity is supported.

Definition at line 570 of file helpers.py.

◆ might_2fa()

bool homeassistant.components.google_assistant.helpers.GoogleEntity.might_2fa (   self)
Return if the entity might encounter 2FA.

Definition at line 575 of file helpers.py.

◆ might_2fa_traits()

bool homeassistant.components.google_assistant.helpers.GoogleEntity.might_2fa_traits (   self)
Return if the entity might encounter 2FA based on just traits.

Definition at line 583 of file helpers.py.

◆ notifications_serialize()

dict[str, Any] | None homeassistant.components.google_assistant.helpers.GoogleEntity.notifications_serialize (   self)
Serialize the payload for notifications to be sent.

Definition at line 703 of file helpers.py.

◆ query_serialize()

def homeassistant.components.google_assistant.helpers.GoogleEntity.query_serialize (   self)
Serialize entity for a QUERY response.

https://developers.google.com/actions/smarthome/create-app#actiondevicesquery

Definition at line 685 of file helpers.py.

◆ reachable_device_serialize()

def homeassistant.components.google_assistant.helpers.GoogleEntity.reachable_device_serialize (   self)
Serialize entity for a REACHABLE_DEVICE response.

Definition at line 713 of file helpers.py.

◆ should_expose()

def homeassistant.components.google_assistant.helpers.GoogleEntity.should_expose (   self)
If entity should be exposed.

Definition at line 553 of file helpers.py.

◆ should_expose_local()

bool homeassistant.components.google_assistant.helpers.GoogleEntity.should_expose_local (   self)
Return if the entity should be exposed locally.

Definition at line 558 of file helpers.py.

◆ sync_serialize()

def homeassistant.components.google_assistant.helpers.GoogleEntity.sync_serialize (   self,
  agent_user_id,
  instance_uuid 
)
Serialize entity for a SYNC response.

https://developers.google.com/actions/smarthome/create-app#actiondevicessync

Definition at line 594 of file helpers.py.

◆ traits()

list[trait._Trait] homeassistant.components.google_assistant.helpers.GoogleEntity.traits (   self)
Return traits for entity.

Definition at line 541 of file helpers.py.

Member Data Documentation

◆ __slots__

tuple homeassistant.components.google_assistant.helpers.GoogleEntity.__slots__ = ("hass", "config", "state", "entity_id", "_traits")
staticprivate

Definition at line 524 of file helpers.py.

◆ _traits

homeassistant.components.google_assistant.helpers.GoogleEntity._traits
private

Definition at line 546 of file helpers.py.

◆ config

homeassistant.components.google_assistant.helpers.GoogleEntity.config

Definition at line 531 of file helpers.py.

◆ entity_id

homeassistant.components.google_assistant.helpers.GoogleEntity.entity_id

Definition at line 533 of file helpers.py.

◆ hass

homeassistant.components.google_assistant.helpers.GoogleEntity.hass

Definition at line 530 of file helpers.py.

◆ state

homeassistant.components.google_assistant.helpers.GoogleEntity.state

Definition at line 532 of file helpers.py.


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