add full support and examples for toggle controller

This commit is contained in:
David 2025-05-13 17:37:00 +00:00
parent c7f0c37aa1
commit f09d03636d
6 changed files with 96 additions and 17 deletions

10
dist/Device.js vendored
View file

@ -69,10 +69,12 @@ class Device extends events_1.EventEmitter {
return this.softwareVersion;
}
addCapability(type) {
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_1.AlexaInterface(type);
this.capabilities.push(newCapability);
// console.log(