add full support and examples for toggle controller
This commit is contained in:
parent
c7f0c37aa1
commit
f09d03636d
6 changed files with 96 additions and 17 deletions
|
|
@ -101,12 +101,12 @@ class Device extends EventEmitter {
|
|||
}
|
||||
|
||||
addCapability(type: AlexaInterfaceType): AlexaInterface {
|
||||
const existing = this.capabilities.find(
|
||||
(iface) => iface.getType() === type
|
||||
);
|
||||
if (existing) {
|
||||
return existing;
|
||||
}
|
||||
// const existing = this.capabilities.find(
|
||||
// (iface) => iface.getType() === type
|
||||
// );
|
||||
// if (existing) {
|
||||
// return existing;
|
||||
// }
|
||||
|
||||
const newCapability = new AlexaInterface(type);
|
||||
this.capabilities.push(newCapability);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue