From 0e1abeb72d0addad48b593ad83b9619b6ad73377 Mon Sep 17 00:00:00 2001 From: marcus Date: Sat, 19 Dec 2015 01:44:22 +0100 Subject: [PATCH] * Fix for https://github.com/philip1986/pimatic-led-light/issues/27 --- devices/iwy_master.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/devices/iwy_master.coffee b/devices/iwy_master.coffee index 31d612f..b65c483 100644 --- a/devices/iwy_master.coffee +++ b/devices/iwy_master.coffee @@ -7,7 +7,11 @@ module.exports = (env) -> class IwyMaster extends BaseLedLight constructor: (@config) -> - @device = new IwyMasterDriver @config.addr, @config.device + if @config.class is 'Wifi370' + deviceType = IwyMasterDriver.DEVICES.WIFI370 + else + deviceType = IwyMasterDriver.DEVICES.IWY_MASTER + @device = new IwyMasterDriver @config.addr, @config.port, deviceType @device.on 'error', (err) -> env.logger.warn 'light error:', err