@koush/ring-client-api
Version:
Unofficial API for Ring doorbells, cameras, security alarm system and smart lighting
23 lines (22 loc) • 831 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MotionSensor = void 0;
const base_device_accessory_1 = require("./base-device-accessory");
const hap_1 = require("./hap");
class MotionSensor extends base_device_accessory_1.BaseDeviceAccessory {
constructor(device, accessory, logger, config) {
super();
this.device = device;
this.accessory = accessory;
this.logger = logger;
this.config = config;
const { Service } = hap_1.hap;
this.registerCharacteristic({
characteristicType: hap_1.hap.Characteristic.MotionDetected,
serviceType: Service.MotionSensor,
getValue: (data) => data.faulted,
});
this.initSensorService(Service.MotionSensor);
}
}
exports.MotionSensor = MotionSensor;