AlexaCapability replaces the header-only AlexaInterface as what a device holds: 116 bytes with fixed places for
3 names, 4 action mappings and 2 state mappings, no std::vector or std::string. AlexaInterface and AlexaActions
stay as 1.x names; the five examples compile unchanged and announce the same bytes.
addCapability(row, instance) adds several capabilities of one generic controller. An instanced interface without
an instance or a name, an instance or semantics on an interface that takes none, and a full store are refused
with an ERROR line that says what to change.
PlaybackController and WakeOnLANController announce "properties": {} (AIF_EMPTY_PROPERTIES).
basicLight on a D1 mini: static RAM 30,788 -> 30,672 B, flash 330,509 -> 332,541 B; host tests 61 -> 77.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
17 lines
513 B
C++
17 lines
513 B
C++
// The names of library 1.x for what 2.0 calls AlexaCapability and AlexaAction. They stay through 2.x, so that a
|
|
// sketch written for 1.x compiles as it is; new sketches use the 2.0 names.
|
|
#ifndef ALEXA_INTERFACE_H
|
|
#define ALEXA_INTERFACE_H
|
|
|
|
#include "AlexaCapability.h"
|
|
|
|
typedef AlexaCapability AlexaInterface;
|
|
typedef AlexaAction AlexaActions;
|
|
|
|
class AlexaActionsUtils
|
|
{
|
|
public:
|
|
static String toString(AlexaActions action) { return String(FPSTR(alexaActionName(action))); }
|
|
};
|
|
|
|
#endif // ALEXA_INTERFACE_H
|