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

Updated Tuya TS0205 (_TZ3210_up3pngle) (model TS0205_smoke_2) #8004

Merged
merged 3 commits into from
Sep 22, 2024
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
14 changes: 10 additions & 4 deletions src/devices/tuya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,12 +821,18 @@ const definitions: DefinitionWithExtend[] = [
{vendor: 'Dongguan Daying Electornics Technology', model: 'YG400A'},
tuya.whitelabel('Tuya', 'TS0205_smoke_2', 'Smoke sensor', ['_TZ3210_up3pngle']),
],
fromZigbee: [fz.ias_smoke_alarm_1, fz.ignore_basic_report],
toZigbee: [],
exposes: [e.smoke(), e.battery_low(), e.tamper()],
// Configure battery % fails
// https://github.com/Koenkk/zigbee2mqtt/issues/22421
extend: [battery({percentageReporting: false})],
extend: [battery({percentageReporting: false}), iasZoneAlarm({zoneType: 'smoke', zoneAttributes: ['alarm_1', 'tamper']})],
configure: async (device, coordinatorEndpoint) => {
if (device?.manufacturerName === '_TZ3210_up3pngle') {
// Required for this version
// https://github.com/Koenkk/zigbee-herdsman-converters/pull/8004
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await reporting.batteryPercentageRemaining(endpoint);
}
},
},
{
zigbeeModel: ['TS0111'],
Expand Down
Loading