node-lifx-lan-multi 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lifx-lan-device.js +5 -5
- package/package.json +1 -1
package/lib/lifx-lan-device.js
CHANGED
|
@@ -377,7 +377,7 @@ LifxLanDevice.prototype.getDeviceInfo = function () {
|
|
|
377
377
|
|
|
378
378
|
LifxLanDevice.prototype._getDeviceMultiZone = function (info) {
|
|
379
379
|
let promise = new Promise((resolve, reject) => {
|
|
380
|
-
if (info
|
|
380
|
+
if (info?.features?.multizone) {
|
|
381
381
|
this.multiZoneGetColorZones({
|
|
382
382
|
start: 0,
|
|
383
383
|
end: 0
|
|
@@ -397,7 +397,7 @@ LifxLanDevice.prototype._getDeviceMultiZone = function (info) {
|
|
|
397
397
|
|
|
398
398
|
LifxLanDevice.prototype._getDeviceChain = function (info) {
|
|
399
399
|
let promise = new Promise((resolve, reject) => {
|
|
400
|
-
if (info
|
|
400
|
+
if (info?.features?.chain) {
|
|
401
401
|
this.tileGetDeviceChain().then((res) => {
|
|
402
402
|
resolve({
|
|
403
403
|
start_index: res['start_index'],
|
|
@@ -451,7 +451,7 @@ LifxLanDevice.prototype.getLightState = function () {
|
|
|
451
451
|
|
|
452
452
|
LifxLanDevice.prototype._getLightInfraredState = function (info) {
|
|
453
453
|
let promise = new Promise((resolve, reject) => {
|
|
454
|
-
if (info
|
|
454
|
+
if (info?.features?.infrared) {
|
|
455
455
|
this.lightGetInfrared().then((res) => {
|
|
456
456
|
resolve(res);
|
|
457
457
|
}).catch((error) => {
|
|
@@ -466,7 +466,7 @@ LifxLanDevice.prototype._getLightInfraredState = function (info) {
|
|
|
466
466
|
|
|
467
467
|
LifxLanDevice.prototype._getLightMultiZoneState = function (info) {
|
|
468
468
|
let promise = new Promise((resolve, reject) => {
|
|
469
|
-
if (info
|
|
469
|
+
if (info?.features?.multizone) {
|
|
470
470
|
let count = info['multizone']['count'];
|
|
471
471
|
let i = 0;
|
|
472
472
|
let colors = [];
|
|
@@ -505,7 +505,7 @@ LifxLanDevice.prototype._getLightMultiZoneState = function (info) {
|
|
|
505
505
|
|
|
506
506
|
LifxLanDevice.prototype._getLightChainState = function (info) {
|
|
507
507
|
let promise = new Promise((resolve, reject) => {
|
|
508
|
-
if (info
|
|
508
|
+
if (info?.features?.chain) {
|
|
509
509
|
this.tileGetTileState64({
|
|
510
510
|
tile_index: info['chain']['start_index'],
|
|
511
511
|
length: info['chain']['total_count'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-lifx-lan-multi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "The node-lifx-lan is a Node.js module which allows you to communicate with the Wi-Fi LED smart light products \"LIFX\" using the LAN protocol.",
|
|
5
5
|
"main": "./lib/lifx-lan.js",
|
|
6
6
|
"files": [
|