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
|
|
@ -135,17 +135,17 @@ class Alex2MQTT extends EventEmitter {
|
|||
}
|
||||
const normalizedCategory =
|
||||
displayCategory === null
|
||||
? null
|
||||
? [DisplayCategory.LIGHT]
|
||||
: Array.isArray(displayCategory)
|
||||
? displayCategory
|
||||
: [displayCategory];
|
||||
: [displayCategory||DisplayCategory.LIGHT];
|
||||
|
||||
const device = new Device(
|
||||
this.client!,
|
||||
this.rootTopic,
|
||||
name,
|
||||
endpointId,
|
||||
normalizedCategory|| [DisplayCategory.LIGHT]
|
||||
normalizedCategory
|
||||
);
|
||||
this.devices.push(device);
|
||||
return device;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue