From 4d06200b2121ce80a5936e604e3d1c50ffd519d8 Mon Sep 17 00:00:00 2001 From: Andreas Holstenson Date: Mon, 15 Jan 2018 08:52:07 +0100 Subject: [PATCH] Adding support for Yeelight strip --- lib/devices/yeelight.lamp.js | 9 --------- lib/models.js | 11 ++++++++--- 2 files changed, 8 insertions(+), 12 deletions(-) delete mode 100644 lib/devices/yeelight.lamp.js diff --git a/lib/devices/yeelight.lamp.js b/lib/devices/yeelight.lamp.js deleted file mode 100644 index 367e58f..0000000 --- a/lib/devices/yeelight.lamp.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -const { Yeelight, ColorTemperature } = require('./yeelight'); - -module.exports = class YeelightLamp extends Yeelight.with(ColorTemperature) { - constructor(options) { - super(options); - } -}; diff --git a/lib/models.js b/lib/models.js index e58b643..d767d87 100644 --- a/lib/models.js +++ b/lib/models.js @@ -14,6 +14,9 @@ const PowerStrip = require('./devices/power-strip'); const Humidifier = require('./devices/humidifier'); +const YeelightColor = require('./devices/yeelight.color'); +const YeelightMono = require('./devices/yeelight.mono'); + module.exports = { 'zhimi.airmonitor.v1': AirMonitor, @@ -40,9 +43,11 @@ module.exports = { 'qmi.powerstrip.v1': PowerStrip, 'zimi.powerstrip.v2': PowerStrip, - 'yeelink.light.lamp1': require('./devices/yeelight.lamp'), - 'yeelink.light.mono1': require('./devices/yeelight.mono'), - 'yeelink.light.color1': require('./devices/yeelight.color'), + 'yeelink.light.lamp1': YeelightMono, + 'yeelink.light.mono1': YeelightMono, + 'yeelink.light.color1': YeelightColor, + 'yeelink.light.strip1': YeelightColor, + 'philips.light.sread1': require('./devices/eyecare-lamp2'), 'philips.light.bulb': require('./devices/philips-light-bulb')