homebridge-syntex-magichome
Advanced tools
Comparing version 1.2.4-b6 to 1.2.4-b7
{ | ||
"name": "homebridge-syntex-magichome", | ||
"version": "1.2.4-b6", | ||
"version": "1.2.4-b7", | ||
"description": "Homebridge Plugin for MagicHome LED Strips with preset scenes", | ||
@@ -15,3 +15,3 @@ "main": "index.js", | ||
"color-convert": "^1.5.0", | ||
"homebridge-syntex-dynamic-platform": "1.0.8-b16" | ||
"homebridge-syntex-dynamic-platform": "1.0.8-b17" | ||
}, | ||
@@ -18,0 +18,0 @@ "keywords": [ |
@@ -16,20 +16,23 @@ const cp = require('child_process'), path = require('path'), convert = require('color-convert'); | ||
var power = output.match(/\] ON /g), | ||
colors = output.match(/\(.*,.*,.*\)/g); | ||
if(!offline) | ||
{ | ||
var power = output.match(/\] ON /g), | ||
colors = output.match(/\(.*,.*,.*\)/g); | ||
state.value = (Array.isArray(power) && power.length > 0); | ||
state.value = (Array.isArray(power) && power.length > 0); | ||
if(Array.isArray(colors) && colors.length > 0) | ||
{ | ||
var converted = colors[0].slice(1).slice(0, -1).split(',').map((item) => item.trim()); | ||
if(Array.isArray(colors) && colors.length > 0) | ||
{ | ||
var converted = colors[0].slice(1).slice(0, -1).split(',').map((item) => item.trim()); | ||
converted = service.setChannels(converted); | ||
converted = convert.rgb.hsv(converted); | ||
converted = service.setChannels(converted); | ||
converted = convert.rgb.hsv(converted); | ||
if(converted != null) | ||
{ | ||
state.hue = converted[0]; | ||
state.saturation = converted[1]; | ||
state.brightness = converted[2]; | ||
if(converted != null) | ||
{ | ||
state.hue = converted[0]; | ||
state.saturation = converted[1]; | ||
state.brightness = converted[2]; | ||
} | ||
} | ||
@@ -54,3 +57,3 @@ } | ||
{ | ||
if(accessory[1].services[i].type == 'rgb' || accessory[1].services[i].type == 'rgbw') | ||
if(accessory[1].services[i].type.startsWith('rgb')) | ||
{ | ||
@@ -67,3 +70,3 @@ this.getDevice(accessory[1].service[parseInt(i) + 1], (state) => { | ||
{ | ||
if(accessory[1].services.type == 'rgb' || accessory[1].services.type == 'rgbw') | ||
if(accessory[1].services.type.startsWith('rgb')) | ||
{ | ||
@@ -70,0 +73,0 @@ this.getDevice(accessory[1].service[1], (state) => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
893
120185
+ Addedhomebridge-syntex-dynamic-platform@1.0.8-b17(transitive)
+ Addedsyntex-logger@1.0.9-b2(transitive)
- Removedhomebridge-syntex-dynamic-platform@1.0.8-b16(transitive)
- Removedsyntex-logger@1.0.9-b1(transitive)