Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.google_assistant.trait.TransportControlTrait Class Reference
Inheritance diagram for homeassistant.components.google_assistant.trait.TransportControlTrait:
[legend]
Collaboration diagram for homeassistant.components.google_assistant.trait.TransportControlTrait:
[legend]

Public Member Functions

def execute (self, command, data, params, challenge)
 
dict[str, Any] query_attributes (self)
 
dict[str, Any] sync_attributes (self)
 
- Public Member Functions inherited from homeassistant.components.google_assistant.trait._Trait
None __init__ (self, HomeAssistant hass, state, config)
 
def can_execute (self, command, params)
 
dict[str, Any]|None query_notifications (self)
 
dict[str, Any] sync_options (self)
 

Static Public Member Functions

def supported (domain, features, device_class, _)
 
- Static Public Member Functions inherited from homeassistant.components.google_assistant.trait._Trait
def might_2fa (domain, features, device_class)
 

Static Public Attributes

list commands
 
 name = TRAIT_TRANSPORT_CONTROL
 

Additional Inherited Members

- Public Attributes inherited from homeassistant.components.google_assistant.trait._Trait
 config
 
 hass
 
 state
 

Detailed Description

Trait to control media playback.

https://developers.google.com/actions/smarthome/traits/transportcontrol

Definition at line 2480 of file trait.py.

Member Function Documentation

◆ execute()

def homeassistant.components.google_assistant.trait.TransportControlTrait.execute (   self,
  command,
  data,
  params,
  challenge 
)
Execute a media command.

Reimplemented from homeassistant.components.google_assistant.trait._Trait.

Definition at line 2527 of file trait.py.

◆ query_attributes()

dict[str, Any] homeassistant.components.google_assistant.trait.TransportControlTrait.query_attributes (   self)
Return the attributes of this trait for this entity.

Reimplemented from homeassistant.components.google_assistant.trait._Trait.

Definition at line 2523 of file trait.py.

◆ supported()

def homeassistant.components.google_assistant.trait.TransportControlTrait.supported (   domain,
  features,
  device_class,
  _ 
)
static
Test if state is supported.

Reimplemented from homeassistant.components.google_assistant.trait._Trait.

Definition at line 2499 of file trait.py.

◆ sync_attributes()

dict[str, Any] homeassistant.components.google_assistant.trait.TransportControlTrait.sync_attributes (   self)
Return opening direction.

Reimplemented from homeassistant.components.google_assistant.trait._Trait.

Definition at line 2508 of file trait.py.

Member Data Documentation

◆ commands

list homeassistant.components.google_assistant.trait.TransportControlTrait.commands
static
Initial value:
= [
COMMAND_MEDIA_NEXT,
COMMAND_MEDIA_PAUSE,
COMMAND_MEDIA_PREVIOUS,
COMMAND_MEDIA_RESUME,
COMMAND_MEDIA_SEEK_RELATIVE,
COMMAND_MEDIA_SEEK_TO_POSITION,
COMMAND_MEDIA_SHUFFLE,
COMMAND_MEDIA_STOP,
]

Definition at line 2487 of file trait.py.

◆ name

homeassistant.components.google_assistant.trait.TransportControlTrait.name = TRAIT_TRANSPORT_CONTROL
static

Definition at line 2486 of file trait.py.


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