Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.google_assistant.trait.OpenCloseTrait Class Reference
Inheritance diagram for homeassistant.components.google_assistant.trait.OpenCloseTrait:
[legend]
Collaboration diagram for homeassistant.components.google_assistant.trait.OpenCloseTrait:
[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 might_2fa (domain, features, device_class)
 
def supported (domain, features, device_class, _)
 

Static Public Attributes

list commands = [COMMAND_OPEN_CLOSE, COMMAND_OPEN_CLOSE_RELATIVE]
 
tuple COVER_2FA
 
 name = TRAIT_OPEN_CLOSE
 

Additional Inherited Members

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

Detailed Description

Trait to open and close a cover.

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

Definition at line 2148 of file trait.py.

Member Function Documentation

◆ execute()

def homeassistant.components.google_assistant.trait.OpenCloseTrait.execute (   self,
  command,
  data,
  params,
  challenge 
)
Execute an Open, close, Set position command.

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

Definition at line 2254 of file trait.py.

◆ might_2fa()

def homeassistant.components.google_assistant.trait.OpenCloseTrait.might_2fa (   domain,
  features,
  device_class 
)
static
Return if the trait might ask for 2FA.

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

Definition at line 2179 of file trait.py.

◆ query_attributes()

dict[str, Any] homeassistant.components.google_assistant.trait.OpenCloseTrait.query_attributes (   self)
Return state query attributes.

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

Definition at line 2219 of file trait.py.

◆ supported()

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

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

Definition at line 2165 of file trait.py.

◆ sync_attributes()

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

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

Definition at line 2183 of file trait.py.

Member Data Documentation

◆ commands

list homeassistant.components.google_assistant.trait.OpenCloseTrait.commands = [COMMAND_OPEN_CLOSE, COMMAND_OPEN_CLOSE_RELATIVE]
static

Definition at line 2162 of file trait.py.

◆ COVER_2FA

tuple homeassistant.components.google_assistant.trait.OpenCloseTrait.COVER_2FA
static
Initial value:
= (
cover.CoverDeviceClass.DOOR,
cover.CoverDeviceClass.GARAGE,
cover.CoverDeviceClass.GATE,
)

Definition at line 2155 of file trait.py.

◆ name

homeassistant.components.google_assistant.trait.OpenCloseTrait.name = TRAIT_OPEN_CLOSE
static

Definition at line 2161 of file trait.py.


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