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.
25 lines • 813 B
JavaScript
import { GW_FRAME_CFM } from "./common.js";
import { ActivateSceneStatus } from "./GW_SCENES.js";
export class GW_ACTIVATE_SCENE_CFM extends GW_FRAME_CFM {
SessionID;
Status;
constructor(Data) {
super(Data);
this.Status = this.Data.readUInt8(0);
this.SessionID = this.Data.readUInt16BE(1);
}
getError() {
switch (this.Status) {
case ActivateSceneStatus.OK:
return "No error.";
case ActivateSceneStatus.InvalidParameter:
return "Invalid parameter.";
case ActivateSceneStatus.RequestRejected:
return "Request rejected.";
default:
return `Unknown error ${this.Status}.`;
}
}
}
//# sourceMappingURL=GW_ACTIVATE_SCENE_CFM.js.map
;