UNPKG

homebridge-z2m

Version:

Expose your Zigbee devices to HomeKit with ease, by integrating Zigbee2MQTT with Homebridge.

20 lines 984 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MovingSensorHandler = void 0; const hap_1 = require("../../hap"); const binary_1 = require("./binary"); class MovingSensorHandler extends binary_1.BinarySensorHandler { static exposesName = 'moving'; constructor(expose, otherExposes, accessory) { super(accessory, expose, otherExposes, MovingSensorHandler.generateIdentifier, 'Motion Sensor (moving)', (n, t) => new hap_1.hap.Service.MotionSensor(n, (MovingSensorHandler.exposesName + ' ' + (t ?? '')).trim()), hap_1.hap.Characteristic.MotionDetected, true, false); } static generateIdentifier(endpoint) { let identifier = MovingSensorHandler.exposesName + '_' + hap_1.hap.Service.MotionSensor.UUID; if (endpoint !== undefined) { identifier += '_' + endpoint.trim(); } return identifier; } } exports.MovingSensorHandler = MovingSensorHandler; //# sourceMappingURL=moving.js.map