Add ssIasZone parser for SJCGQ11LM to directly detect water_leak. #17

This commit is contained in:
Koenkk
2018-05-08 20:47:33 +02:00
parent 8436768dc0
commit 4fc4c7b83a
+8 -7
View File
@@ -43,7 +43,7 @@ const store = {}
const parsers = [
{
devices: ['WXKG01LM', 'RTCGQ01LM', 'WSDCGQ01LM', 'MCCGQ01LM', 'WXKG11LM', 'MCCGQ11LM', 'RTCGQ11LM', 'WSDCGQ11LM'],
devices: ['WXKG01LM', 'RTCGQ01LM', 'WSDCGQ01LM', 'MCCGQ01LM', 'WXKG11LM', 'MCCGQ11LM', 'RTCGQ11LM', 'WSDCGQ11LM', 'SJCGQ11LM'],
cid: 'genBasic',
type: 'attReport',
disablePublish: true,
@@ -204,12 +204,13 @@ const parsers = [
devices: ['SJCGQ11LM'],
cid: 'genBasic',
type: 'attReport',
convert: (msg) => {
return {
battery: toPercentage(msg.data.data['65281']['1'], battery.min, battery.max),
water_leak: msg.data.data['65281']['100'] === 1,
};
}
convert: (msg) => {return {water_leak: msg.data.data['65281']['100'] === 1}}
},
{
devices: ['SJCGQ11LM'],
cid: 'ssIasZone',
type: 'statusChange',
convert: (msg) => {return {water_leak: msg.data.zoneStatus === 1}}
},
{
devices: ['ZNCZ02LM', 'QBCZ11LM'],