homebridge-boschcontrolpanel_bgseries
Version:
Homebridge plugin for Bosch Control Panel.
21 lines • 958 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.HKMotionSensor = void 0;
const HKSensor_1 = require("./HKSensor");
const BGPoint_1 = require("./BGPoint");
const platform_1 = require("./platform");
class HKMotionSensor extends HKSensor_1.HKSensor {
constructor(platform, PointNumber) {
super(platform, PointNumber, platform_1.BGSensorType.MotionSensor);
this.platform = platform;
this.PointNumber = PointNumber;
this.service = this.Accessory.getService(this.platform.Service.MotionSensor)
|| this.Accessory.addService(this.platform.Service.MotionSensor);
}
HandleEventDetected(PointStatus) {
const MotionDetected = PointStatus !== BGPoint_1.BGPointStatus.Normal;
this.service.updateCharacteristic(this.platform.Characteristic.MotionDetected, MotionDetected);
}
}
exports.HKMotionSensor = HKMotionSensor;
//# sourceMappingURL=HKMotionSensor.js.map