Update ZNCZ02LM converters.

This commit is contained in:
Koenkk 2018-05-17 18:33:32 +02:00
parent 7f5865aaf9
commit 8207321c30

View File

@ -314,36 +314,17 @@ const parsers = [
cid: 'genBasic',
type: 'attReport',
convert: (msg) => {
if(msg.data.data['65281']){
if (msg.data.data['65281']) {
const data = msg.data.data['65281'];
const result = {
state: data['100'] === 1 ? "ON" : "OFF",
return {
state: data['100'] === 1 ? 'ON' : 'OFF',
power: precisionRound(data['152'], 2),
consumption: precisionRound(data['149'], 2),
temperature: precisionRound(data['3'], 2),
voltage: precisionRound(data['150'] * 0.1, 1),
consumption: precisionRound(data['149'], 2), // ??
temperature: precisionRound(data['3'], 2), // ??
};
return result;
}
}
},
{
devices: ['ZNCZ02LM'],
cid: 'genBasic',
type: 'devChange',
convert: (msg) => {
if(msg.data.data['65281']){
const data = msg.data.data['65281'];
const result = {
state: data['100'] === 1 ? "ON" : "OFF",
power: precisionRound(data['152'], 2),
consumption: precisionRound(data['149'], 2),
temperature: precisionRound(data['3'], 2),
voltage: precisionRound(data['150'] * 0.1, 1),
};
return result;
}
}
},
},
{
devices: ['QBKG04LM'],
@ -411,7 +392,7 @@ const parsers = [
{
devices: [
'WXKG11LM', 'MCCGQ11LM', 'RTCGQ11LM', 'WSDCGQ11LM', 'SJCGQ11LM', 'MCCGQ01LM', 'RTCGQ01LM', 'WXKG01LM',
'WSDCGQ01LM', 'JTYJ-GD-01LM/BW',
'WSDCGQ01LM', 'JTYJ-GD-01LM/BW', 'ZNCZ02LM',
],
cid: 'genBasic',
type: 'devChange',