UNPKG

homebridge-loxone-proxy

Version:

Homebridge Dynamic Platform Plugin which exposes a Loxone System to Homekit.

23 lines 1.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NfcCodeTouch = void 0; const LoxoneAccessory_1 = require("../../LoxoneAccessory"); const Doorbell_1 = require("../../homekit/services/Doorbell"); const MotionSensor_1 = require("../../homekit/services/MotionSensor"); class NfcCodeTouch extends LoxoneAccessory_1.LoxoneAccessory { configureServices() { const mapping = this.platform.config.Advanced.NfcCodeTouchMapping; this.platform.log.debug('Configuring NfcCodeTouch with mapping:', mapping); this.initializeService(mapping); } initializeService(mapping) { const serviceClass = mapping === 'DoorBell' ? Doorbell_1.Doorbell : MotionSensor_1.MotionSensor; this.ItemStates = { [this.device.states.events]: { 'service': 'PrimaryService', 'state': 'events' }, }; this.Service.PrimaryService = new serviceClass(this.platform, this.Accessory); this.platform.log.debug(`${serviceClass.name} service initialized.`); } } exports.NfcCodeTouch = NfcCodeTouch; //# sourceMappingURL=NfcCodeTouch.js.map