UNPKG

@pmouli/isy-matter-server

Version:

Service to expose an ISY device as a Matter Border router

33 lines 1.07 kB
export var Feature; (function (Feature) { Feature[Feature["None"] = 0] = "None"; Feature[Feature["Dimmable"] = 1] = "Dimmable"; Feature[Feature["Socket"] = 2] = "Socket"; Feature[Feature["Switch"] = 4] = "Switch"; Feature[Feature["HasLoad"] = 8] = "HasLoad"; Feature[Feature["Queryable"] = 16] = "Queryable"; Feature[Feature["BatteryPowered"] = 32] = "BatteryPowered"; })(Feature || (Feature = {})); (function (Feature) { const FeatureE = Feature; function has(device, feature) { return (device.features & feature) === feature; } Feature.has = has; function add(device, feature) { device.features |= feature; } Feature.add = add; function get(device) { let features = []; for (const l in Object.values(Feature)) { if (typeof l !== 'string') if (has(device, l)) { features.push(l); } } return features; } Feature.get = get; })(Feature || (Feature = {})); //# sourceMappingURL=Features.js.map