UNPKG

homebridge-boschcontrolpanel_bgseries

Version:
21 lines 958 B
"use strict"; 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