Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
heroprint authored and sbp committed Sep 5, 2022
1 parent 4250c31 commit e6110d2
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions lib/devices/gen1/shellycolorbulb.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,43 +357,43 @@ const shellycolorbulb = {
'write': true
}
},
},
'metering.power': {
coap: {
coap_publish: '4101',
coap_publish_funct: (value) => { return value },
},
mqtt: {
http_publish: '/status',
http_publish_funct: (value) => { return value ? JSON.parse(value).meters[0].power : undefined; },
},
common: {
'name': 'Device Power status',
'type': 'number',
'role': 'value',
'unit': 'W',
'read': true,
'write': false
}
},
'metering.energy': {
coap: {
coap_publish: '4103',
coap_publish_funct: (value) => { return value },
},
mqtt: {
http_publish: '/status',
http_publish_funct: (value) => { return value ? JSON.parse(value).meters[0].energy : undefined; },
'metering.power': {
coap: {
coap_publish: '4101',
coap_publish_funct: (value) => { return value },
},
mqtt: {
http_publish: '/status',
http_publish_funct: (value) => { return value ? JSON.parse(value).meters[0].power : undefined; },
},
common: {
'name': 'Device Power status',
'type': 'number',
'role': 'value',
'unit': 'W',
'read': true,
'write': false
}
},
common: {
'name': 'Device Energy status',
'type': 'number',
'role': 'value',
'unit': 'Wmin',
'read': true,
'write': false
'metering.energy': {
coap: {
coap_publish: '4103',
coap_publish_funct: (value) => { return value },
},
mqtt: {
http_publish: '/status',
http_publish_funct: (value) => { return value ? JSON.parse(value).meters[0].energy : undefined; },
},
common: {
'name': 'Device Energy status',
'type': 'number',
'role': 'value',
'unit': 'Wmin',
'read': true,
'write': false
}
}
};
}

module.exports = {
shellycolorbulb: shellycolorbulb
Expand Down

0 comments on commit e6110d2

Please sign in to comment.