UNPKG

node-red-contrib-nanoleaf

Version:

[![platform](https://img.shields.io/badge/platform-Node--RED-red?logo=nodered)](https://nodered.org) [![Min Node Version](https://img.shields.io/node/v/node-red-contrib-nanoleaf.svg)](https://nodejs.org/en/) [![GitHub version](https://img.shields.io/githu

17 lines (13 loc) 440 B
module.exports = function (RED) { 'use strict' function Identify(config) { RED.nodes.createNode(this, config) var node = this var installationObj = RED.nodes.getNode(config.installation) this.on('input', () => { installationObj.identify() .catch((err) => node.error(err.message, err)) }) } RED.nodes.registerType('identify', Identify) }