Skip to content

Commit

Permalink
feat(add): U86Z13A16-ZJH(HA) (#5904)
Browse files Browse the repository at this point in the history
* Add Honyar U86Z13A16-ZJH(HA)

* Fix endpoint
  • Loading branch information
guotianx authored Jun 23, 2023
1 parent 08e8fc5 commit 9302b7e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/devices/honyar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import {Definition} from '../lib/types';
import * as exposes from '../lib/exposes';
import * as reporting from '../lib/reporting';
import extend from '../lib/extend';
import fz from '../converters/fromZigbee';
import tz from '../converters/toZigbee';
const e = exposes.presets;

const definitions: Definition[] = [
Expand All @@ -27,6 +29,26 @@ const definitions: Definition[] = [
await reporting.onOff(endpoint3);
},
},
{
zigbeeModel: ['HY0043'],
model: 'U86Z13A16-ZJH(HA)',
vendor: 'Honyar',
description: 'Smart Power Socket 16A (with power monitoring)',
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering],
toZigbee: [tz.on_off],
exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy()],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
await reporting.onOff(endpoint);
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
await reporting.activePower(endpoint);
await reporting.rmsCurrent(endpoint);
await reporting.rmsVoltage(endpoint);
await reporting.readMeteringMultiplierDivisor(endpoint);
await reporting.currentSummDelivered(endpoint);
},
},
];

module.exports = definitions;

0 comments on commit 9302b7e

Please sign in to comment.