Refactor code to use plejd outputs rather than devices as main entity
This commit is contained in:
parent
ef718cf1db
commit
9a76a3ba50
10 changed files with 185 additions and 158 deletions
|
|
@ -1,7 +1,11 @@
|
|||
class SceneStep {
|
||||
/**
|
||||
* @param {import("./types/ApiSite").SceneStep} step
|
||||
*/
|
||||
constructor(step) {
|
||||
this.sceneId = step.sceneId;
|
||||
this.deviceId = step.deviceId;
|
||||
this.output = step.output;
|
||||
this.state = step.state === 'On' ? 1 : 0;
|
||||
this.brightness = step.value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue