Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Honyar U86Z13A16-ZJH(HA) #5904

Merged
merged 2 commits into from
Jun 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;