From 8102062fb8a0973ae81ac8a8a322da1f8fa725e1 Mon Sep 17 00:00:00 2001 From: z-jack Date: Thu, 30 Sep 2021 17:09:23 +0800 Subject: [PATCH] Fix heartbeat is invalid for some devices --- yeelight/lib/yee.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yeelight/lib/yee.js b/yeelight/lib/yee.js index 31df8a4..8d7e1c8 100644 --- a/yeelight/lib/yee.js +++ b/yeelight/lib/yee.js @@ -95,7 +95,7 @@ YeeDevice = function (did, loc, model, power, bri, hue, sat, ct, name, color_mod console.log("send hb to: " + that.did); that.sendCmd({ - id: -1, + id: 0, method: 'get_prop', params: ['power', 'bright', 'rgb'] }); @@ -109,7 +109,7 @@ YeeDevice = function (did, loc, model, power, bri, hue, sat, ct, name, color_mod rsps.forEach(function (json, idex, array) { try { JSON.parse(json, function(k,v) { - if (k == 'id' && v == -1) { + if (k == 'id') { that.hb_lost = 0; }