Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-syntex-magichome

Package Overview
Dependencies
Maintainers
1
Versions
423
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-syntex-magichome - npm Package Compare versions

Comparing version 1.2.4-b6 to 1.2.4-b7

4

package.json
{
"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) => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc