Public Member Functions | |
| None | __init__ (self, list[str] labels) |
| dict[str, list[dict[str, Any]]] | serialize_capability_resources (self) |
| dict[str, Any] | serialize_configuration (self) |
| dict[str, list[dict[str, Any]]] | serialize_labels (self, list[str] resources) |
Private Attributes | |
| _resource_labels | |
Base class for Alexa capabilityResources, modeResources, and presetResources. Resources objects labels must be unique across all modeResources and presetResources within the same device. To provide support for all supported locales, include one label from the AlexaGlobalCatalog in the labels array. You cannot use any words from the following list as friendly names: https://developer.amazon.com/docs/alexa/device-apis/resources-and-assets.html#names-you-cannot-use https://developer.amazon.com/docs/device-apis/resources-and-assets.html#capability-resources
Definition at line 198 of file resources.py.
| None homeassistant.components.alexa.resources.AlexaCapabilityResource.__init__ | ( | self, | |
| list[str] | labels | ||
| ) |
Initialize an Alexa resource.
Definition at line 212 of file resources.py.
| dict[str, list[dict[str, Any]]] homeassistant.components.alexa.resources.AlexaCapabilityResource.serialize_capability_resources | ( | self | ) |
Return capabilityResources object serialized for an API response.
Definition at line 218 of file resources.py.
| dict[str, Any] homeassistant.components.alexa.resources.AlexaCapabilityResource.serialize_configuration | ( | self | ) |
Return serialized configuration for an API response. Return ModeResources, PresetResources friendlyNames serialized.
Reimplemented in homeassistant.components.alexa.resources.AlexaPresetResource, and homeassistant.components.alexa.resources.AlexaModeResource.
Definition at line 222 of file resources.py.
| dict[str, list[dict[str, Any]]] homeassistant.components.alexa.resources.AlexaCapabilityResource.serialize_labels | ( | self, | |
| list[str] | resources | ||
| ) |
Return serialized labels for an API response. Returns resource label objects for friendlyNames serialized.
Definition at line 229 of file resources.py.
|
private |
Definition at line 214 of file resources.py.