diff --git a/lib/safeishJSON.js b/lib/safeishJSON.js index b1627d8..db99eec 100644 --- a/lib/safeishJSON.js +++ b/lib/safeishJSON.js @@ -6,6 +6,8 @@ module.exports = function(str) { } catch(ex) { // Case 1: Load for subdevices fail as they return empty values str = str.replace('[,]', '[null,null]'); + // for aqara body sensor (lumi.motion.aq2) + str = str.replace('[,,]', '[null,null,null]'); return JSON.parse(str); }