Handle when scene and device have the same Id
- Catch emitted errors in Mqtt
This commit is contained in:
parent
dca491bf00
commit
ef7a5086a1
4 changed files with 27 additions and 10 deletions
|
|
@ -24,7 +24,7 @@ class SceneManager extends EventEmitter {
|
|||
this.scenes = {};
|
||||
scenes.forEach((scene) => {
|
||||
const idx = this.deviceRegistry.apiSite.sceneIndex[scene.sceneId];
|
||||
this.scenes[scene.id] = new Scene(idx, scene, this.deviceRegistry.apiSite.sceneSteps);
|
||||
this.scenes[idx] = new Scene(idx, scene, this.deviceRegistry.apiSite.sceneSteps);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue