ednl-liftstatus-web-components
Version:
The EDNL LiftStatus web components
19 lines (18 loc) • 622 B
JavaScript
import sensorLabels from "./sensor-labels.json";
import shortSensorLabels from "./sensor-labels-short.json";
import sensorValues from "./sensor-values.json";
/**
* Class with helper functions to get sensor labels and to translate raw values into human readable ones
*/
export 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;
}
}
//# sourceMappingURL=sensorInfo.js.map