Skip to content

Commit 615eb00

Browse files
fix: Fix battery reporting for Tuya _TZ3210_up3pngle (#8004)
* Updated Tuya TS0205 _TZ3210_up3pngle (model TS0205_smoke_2) to use only ModernExtend * Updated TS0205 smoke sensor settings
1 parent 4f9c0d0 commit 615eb00

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/devices/tuya.ts

+10-4
Original file line numberDiff line numberDiff line change
@@ -821,12 +821,18 @@ const definitions: DefinitionWithExtend[] = [
821821
{vendor: 'Dongguan Daying Electornics Technology', model: 'YG400A'},
822822
tuya.whitelabel('Tuya', 'TS0205_smoke_2', 'Smoke sensor', ['_TZ3210_up3pngle']),
823823
],
824-
fromZigbee: [fz.ias_smoke_alarm_1, fz.ignore_basic_report],
825-
toZigbee: [],
826-
exposes: [e.smoke(), e.battery_low(), e.tamper()],
827824
// Configure battery % fails
828825
// https://github.com/Koenkk/zigbee2mqtt/issues/22421
829-
extend: [battery({percentageReporting: false})],
826+
extend: [battery({percentageReporting: false}), iasZoneAlarm({zoneType: 'smoke', zoneAttributes: ['alarm_1', 'tamper']})],
827+
configure: async (device, coordinatorEndpoint) => {
828+
if (device?.manufacturerName === '_TZ3210_up3pngle') {
829+
// Required for this version
830+
// https://github.com/Koenkk/zigbee-herdsman-converters/pull/8004
831+
const endpoint = device.getEndpoint(1);
832+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
833+
await reporting.batteryPercentageRemaining(endpoint);
834+
}
835+
},
830836
},
831837
{
832838
zigbeeModel: ['TS0111'],

0 commit comments

Comments
 (0)