UNPKG

klf-200-api

Version:

This module provides a wrapper to the socket API of a Velux KLF-200 interface. You will need at least firmware 0.2.0.0.71 on your KLF interface for this library to work.

19 lines 746 B
"use strict"; import { GW_FRAME_NTF, readZString } from "./common.js"; export class GW_GET_SCENE_LIST_NTF extends GW_FRAME_NTF { NumberOfScenes; NumberOfRemainingScenes; Scenes = []; constructor(Data) { super(Data); this.NumberOfScenes = this.Data.readUInt8(0); this.NumberOfRemainingScenes = this.Data.readUInt8(this.NumberOfScenes * 65 + 1); for (let sceneIndex = 0; sceneIndex < this.NumberOfScenes; sceneIndex++) { this.Scenes.push({ SceneID: this.Data.readUInt8(sceneIndex * 65 + 1), Name: readZString(this.Data.subarray(sceneIndex * 65 + 2, sceneIndex * 65 + 66)), }); } } } //# sourceMappingURL=GW_GET_SCENE_LIST_NTF.js.map