using a map in the lights

This commit is contained in:
Martin Donnelly 2017-11-11 22:37:59 +00:00
parent d6ce365f25
commit 90b5829e1e

View File

@ -10,7 +10,10 @@ const Hs100Controller = function() {
const _this = this;
client.startDiscovery().on('device-new', (device) => {
device.getSysInfo().then((deviceInfo) => {
device.getSysInfo().
catch((err) => {
logger.error(err);
}).then((deviceInfo) => {
logger.debug(deviceInfo);
_this.emit('found', deviceInfo);
});