UNPKG

node-enocean-ts

Version:

Typescript full implementation of the enocean protocol (ESP3 + EEP2.6)

22 lines 597 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = default_1; function default_1(eep, data) { var ret = null; var eepa = eep.split("-"); var choice = eepa[0]; var func = eepa[1]; var type = eepa[2]; var typeNr = parseInt(type, 16); var i = (parseInt(data, 16) & 1); var contact = ["open", "closed"]; if (eep === "d5-00-01") { return [{ type: "contact", unit: "", value: contact[i] }]; } return ret; } //# sourceMappingURL=eep-d5-00-01.js.map