Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.google_assistant.trait.ArmDisArmTrait Class Reference
Inheritance diagram for homeassistant.components.google_assistant.trait.ArmDisArmTrait:
[legend]
Collaboration diagram for homeassistant.components.google_assistant.trait.ArmDisArmTrait:
[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_ARM_DISARM]
 
 name = TRAIT_ARM_DISARM
 
dictionary state_to_service
 
dictionary state_to_support
 

Private Member Functions

def _default_arm_state (self)
 
def _supported_states (self)
 

Additional Inherited Members

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

Detailed Description

Trait to Arm or Disarm a Security System.

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

Definition at line 1546 of file trait.py.

Member Function Documentation

◆ _default_arm_state()

def homeassistant.components.google_assistant.trait.ArmDisArmTrait._default_arm_state (   self)
private

Definition at line 1591 of file trait.py.

◆ _supported_states()

def homeassistant.components.google_assistant.trait.ArmDisArmTrait._supported_states (   self)
private
Return supported states.

Definition at line 1582 of file trait.py.

◆ execute()

def homeassistant.components.google_assistant.trait.ArmDisArmTrait.execute (   self,
  command,
  data,
  params,
  challenge 
)
Execute an ArmDisarm command.

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

Definition at line 1633 of file trait.py.

◆ might_2fa()

def homeassistant.components.google_assistant.trait.ArmDisArmTrait.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 1578 of file trait.py.

◆ query_attributes()

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

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

Definition at line 1622 of file trait.py.

◆ supported()

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

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

Definition at line 1573 of file trait.py.

◆ sync_attributes()

dict[str, Any] homeassistant.components.google_assistant.trait.ArmDisArmTrait.sync_attributes (   self)
Return ArmDisarm attributes for a sync request.

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

Definition at line 1602 of file trait.py.

Member Data Documentation

◆ commands

list homeassistant.components.google_assistant.trait.ArmDisArmTrait.commands = [COMMAND_ARM_DISARM]
static

Definition at line 1553 of file trait.py.

◆ name

homeassistant.components.google_assistant.trait.ArmDisArmTrait.name = TRAIT_ARM_DISARM
static

Definition at line 1552 of file trait.py.

◆ state_to_service

dictionary homeassistant.components.google_assistant.trait.ArmDisArmTrait.state_to_service
static
Initial value:
= {
AlarmControlPanelState.ARMED_HOME: SERVICE_ALARM_ARM_HOME,
AlarmControlPanelState.ARMED_NIGHT: SERVICE_ALARM_ARM_NIGHT,
AlarmControlPanelState.ARMED_AWAY: SERVICE_ALARM_ARM_AWAY,
AlarmControlPanelState.ARMED_CUSTOM_BYPASS: SERVICE_ALARM_ARM_CUSTOM_BYPASS,
AlarmControlPanelState.TRIGGERED: SERVICE_ALARM_TRIGGER,
}

Definition at line 1555 of file trait.py.

◆ state_to_support

dictionary homeassistant.components.google_assistant.trait.ArmDisArmTrait.state_to_support
static
Initial value:
= {
AlarmControlPanelState.ARMED_HOME: AlarmControlPanelEntityFeature.ARM_HOME,
AlarmControlPanelState.ARMED_NIGHT: AlarmControlPanelEntityFeature.ARM_NIGHT,
AlarmControlPanelState.ARMED_AWAY: AlarmControlPanelEntityFeature.ARM_AWAY,
AlarmControlPanelState.ARMED_CUSTOM_BYPASS: AlarmControlPanelEntityFeature.ARM_CUSTOM_BYPASS,
AlarmControlPanelState.TRIGGERED: AlarmControlPanelEntityFeature.TRIGGER,
}

Definition at line 1563 of file trait.py.


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