* Add working support for color temperature * Lint fixes * Fix to config json version to make it build * Clean up and BLE constants and prepare for lightlevel UUID * Eagerly send HA discovery, standardize colorTemp, clean up MQTT subscribe * Fix typo in MqttClient * Listen to HA birth messages to make devices available after HA restart - Extract constants to common file * Prepare for 0.17.0 release
16 lines
382 B
JavaScript
16 lines
382 B
JavaScript
const { SCENE_STATES } = require('./constants');
|
|
|
|
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 === SCENE_STATES.ON ? 1 : 0;
|
|
this.brightness = step.value;
|
|
}
|
|
}
|
|
|
|
module.exports = SceneStep;
|