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.
22 lines • 700 B
JavaScript
import { GW_FRAME_CFM, GW_INVERSE_STATUS } from "./common.js";
export class GW_SET_CONTACT_INPUT_LINK_CFM extends GW_FRAME_CFM {
ContactInputID;
Status;
constructor(Data) {
super(Data);
this.ContactInputID = this.Data.readUInt8(0);
this.Status = this.Data.readUInt8(1);
}
getError() {
switch (this.Status) {
case GW_INVERSE_STATUS.SUCCESS:
throw new Error("No error.");
case GW_INVERSE_STATUS.ERROR:
return "Request failed.";
default:
return `Unknown error ${this.Status}.`;
}
}
}
//# sourceMappingURL=GW_SET_CONTACT_INPUT_LINK_CFM.js.map
;