UNPKG

ednl-liftstatus-web-components

Version:
73 lines (68 loc) 1.63 kB
const sensorLabels = { "104": "Bezoek", "105": "Onbeschikbaar", "106": "Lift in storing", "210": "Verzamel storing", "211": "Verzamel melding", "500": "Bewegingstoestand", "501": "Huidige stopplaats (open deuren)", "502": "Deur positie voor", "503": "Deur positie achter", "513": "Statusmeldingen", "514": "Laatst gepasseerde stopplaats", "515": "Huidige stopplaats", "524": "Verbinding met sturing gezond", "550": "Na oproep geen reactie", "590": "Sturing info" }; const shortSensorLabels = { "104": "Bezoek", "105": "Onbeschikbaar", "106": "Lift in storing", "210": "Verzamel storing", "211": "Verzamel melding", "500": "Status lift", "501": "Huidige stop", "502": "Deur voor", "503": "Deur achter", "513": "Statusmeldingen", "514": "Laatst gepasseerd", "515": "Huidige stop", "524": "Sturing OK", "550": "Geen reactie", "590": "Sturing info" }; const C = "Dicht"; const D = "Naar beneden"; const I = "Inactief"; const O = "Open"; const U = "Naar boven"; const X = "Vergrendeld"; const sensorValues = { C: C, D: D, I: I, O: O, U: U, X: X, "-": "Sluiten", "+": "Openen", "?": "Fout", "¿": "Fout" }; /** * Class with helper functions to get sensor labels and to translate raw values into human readable ones */ class sensorInfo { static getLabel(sensorId) { return sensorLabels[sensorId] || sensorId.toString(); } static getShortLabel(sensorId) { return shortSensorLabels[sensorId] || sensorId.toString(); } static getValue(sensorValue) { return sensorValues[sensorValue] || sensorValue; } } export { sensorInfo as s }; //# sourceMappingURL=sensorInfo.js.map