UNPKG

homebridge-gsh

Version:
26 lines 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ghToHap = void 0; class ghToHap { createSyncData(service, typeTraits) { return Object.assign(Object.assign({ id: service.uniqueId }, typeTraits), { name: { defaultNames: [ ...(service.serviceName ? [service.serviceName] : []), ...(service.accessoryInformation.Name ? [service.accessoryInformation.Name] : []), ], name: service.serviceName || service.accessoryInformation.Name || 'Missing Name', nicknames: [], }, willReportState: true, deviceInfo: { manufacturer: service.accessoryInformation.Manufacturer, model: service.accessoryInformation.Model, }, customData: { aid: service.aid, iid: service.iid, instanceUsername: service.instance.username, instanceIpAddress: service.instance.ipAddress, instancePort: service.instance.port, } }); } } exports.ghToHap = ghToHap; //# sourceMappingURL=ghToHapTypes.js.map