UNPKG

homey

Version:

Command-line interface and type declarations for Homey Apps

35 lines (29 loc) 754 B
'use strict'; const Homey = require('homey'); module.exports = class MyDriver extends Homey.Driver { /** * onInit is called when the driver is initialized. */ async onInit() { this.log('MyDriver has been initialized'); } /** * onPairListDevices is called when a user is adding a device * and the 'list_devices' view is called. * This should return an array with the data of devices that are available for pairing. */ async onPairListDevices() { return [ // Example device data, note that `store` is optional // { // name: 'My Device', // data: { // id: 'my-device', // }, // store: { // address: '127.0.0.1', // }, // }, ]; } };