UNPKG

lisa-plugin-example

Version:

L.I.S.A. plugin example to learn how create them

42 lines (35 loc) 738 B
'use strict' const Plugin = require('lisa-plugin') module.exports = class ExamplePlugin extends Plugin { /** * Initialisation of your plugin * Called once, when plugin is loaded * @returns Promise */ init() { return Promise.resolve() } /** * Called automatically to search for new devices * @return Promise */ searchDevices() { return Promise.resolve() } /** * Called when * @param action to execute * @param infos context of the action * @return Promise */ interact(action, infos) { return Promise.resolve() } constructor(app) { super(app, { config: require('./config'), drivers: require('./drivers'), pkg: require('./package') }) } }