Skip to content

Commit

Permalink
fix: Fix configure failing for TuYa _TZ3000_0zfrhq4i Koenkk/zigbee2…
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Nov 30, 2023
1 parent e63415f commit 6b885ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3284,7 +3284,11 @@ const definitions: Definition[] = [
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
await reporting.rmsVoltage(endpoint, {change: 5});
await reporting.rmsCurrent(endpoint, {change: 50});
await reporting.activePower(endpoint, {change: 10});
if (device.manufacturerName !== '_TZ3000_0zfrhq4i') {
// Gives INVALID_DATA_TYPE error for _TZ3000_0zfrhq4i
// https://github.com/Koenkk/zigbee2mqtt/discussions/19680#discussioncomment-7667035
await reporting.activePower(endpoint, {change: 10});
}
await reporting.currentSummDelivered(endpoint);
const acCurrentDivisor = device.manufacturerName === '_TZ3000_typdpbpg' ? 2000 : 1000;
endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {acCurrentDivisor, acCurrentMultiplier: 1});
Expand Down

0 comments on commit 6b885ce

Please sign in to comment.