Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.alexa.resources.AlexaModeResource Class Reference
Inheritance diagram for homeassistant.components.alexa.resources.AlexaModeResource:
[legend]
Collaboration diagram for homeassistant.components.alexa.resources.AlexaModeResource:
[legend]

Public Member Functions

None __init__ (self, list[str] labels, bool ordered=False)
 
None add_mode (self, str value, list[str] labels)
 
dict[str, Any] serialize_configuration (self)
 
- Public Member Functions inherited from homeassistant.components.alexa.resources.AlexaCapabilityResource
None __init__ (self, list[str] labels)
 
dict[str, list[dict[str, Any]]] serialize_capability_resources (self)
 
dict[str, list[dict[str, Any]]] serialize_labels (self, list[str] resources)
 

Detailed Description

Implements Alexa ModeResources.

https://developer.amazon.com/docs/device-apis/resources-and-assets.html#capability-resources

Definition at line 250 of file resources.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.alexa.resources.AlexaModeResource.__init__ (   self,
list[str]  labels,
bool   ordered = False 
)
Initialize an Alexa modeResource.

Definition at line 256 of file resources.py.

Member Function Documentation

◆ add_mode()

None homeassistant.components.alexa.resources.AlexaModeResource.add_mode (   self,
str  value,
list[str]  labels 
)
Add mode to the supportedModes object.

Definition at line 262 of file resources.py.

◆ serialize_configuration()

dict[str, Any] homeassistant.components.alexa.resources.AlexaModeResource.serialize_configuration (   self)
Return serialized configuration for an API response.

Returns configuration for ModeResources friendlyNames serialized.

Reimplemented from homeassistant.components.alexa.resources.AlexaCapabilityResource.

Definition at line 266 of file resources.py.


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