Skip to content

Commit

Permalink
Add electricity measurements for CCT711119 (#2941)
Browse files Browse the repository at this point in the history
  • Loading branch information
rindlerblabla authored Aug 23, 2021
1 parent 93f130f commit 986c0a7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions devices/schneider_electric.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,20 @@ module.exports = [
model: 'CCT711119',
vendor: 'Schneider Electric',
description: 'Wiser smart plug',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
exposes: [e.switch()],
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.power_on_behavior],
toZigbee: [tz.on_off, tz.power_on_behavior, tz.electrical_measurement_power],
exposes: [e.switch(), e.power().withAccess(ea.STATE_GET), e.energy(),
exposes.enum('power_on_behavior', ea.ALL, ['off', 'previous', 'on'])
.withDescription('Controls the behaviour when the device is powered on')],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
await reporting.onOff(endpoint);
// only activePower seems to be support, although compliance document states otherwise
await endpoint.read('haElectricalMeasurement', ['acPowerMultiplier', 'acPowerDivisor']);
await reporting.activePower(endpoint);
await reporting.readMeteringMultiplierDivisor(endpoint);
await reporting.currentSummDelivered(endpoint, {min: 60, change: 1});
},
},
{
Expand Down

0 comments on commit 986c0a7

Please sign in to comment.