Skip to content

Commit 286d454

Browse files
committed
fix: Fix Handling of poll check-in failed for Tuya TS0203 Koenkk/zigbee2mqtt#24938
1 parent 8528633 commit 286d454

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/devices/adeo.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,10 @@ const definitions: DefinitionWithExtend[] = [
326326
exposes: [e.warning(), e.battery(), e.battery_low(), e.tamper()],
327327
extend: [quirkCheckinInterval(0)],
328328
configure: async (device, coordinatorEndpoint) => {
329-
await device.getEndpoint(1).unbind('genPollCtrl', coordinatorEndpoint);
329+
const endpoint = device.getEndpoint(1);
330+
if (endpoint.binds.some((b) => b.cluster.name === 'genPollCtrl')) {
331+
await endpoint.unbind('genPollCtrl', coordinatorEndpoint);
332+
}
330333
},
331334
},
332335
{

src/devices/bosch.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,9 @@ const definitions: DefinitionWithExtend[] = [
11271127
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'ssIasZone', 'ssIasWd', 'genBasic']);
11281128
await reporting.batteryVoltage(endpoint);
11291129
await endpoint.read(0x0502, [0xa000, 0xa001, 0xa002, 0xa003, 0xa004, 0xa005], manufacturerOptions);
1130-
await endpoint.unbind('genPollCtrl', coordinatorEndpoint);
1130+
if (endpoint.binds.some((b) => b.cluster.name === 'genPollCtrl')) {
1131+
await endpoint.unbind('genPollCtrl', coordinatorEndpoint);
1132+
}
11311133
},
11321134
exposes: [
11331135
e.binary('alarm_state', ea.ALL, 'ON', 'OFF').withDescription('Alarm turn ON/OFF'),

src/devices/tuya.ts

+5
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,11 @@ const definitions: DefinitionWithExtend[] = [
923923
} catch {
924924
/* Fails for some*/
925925
}
926+
927+
const endpoint = device.getEndpoint(1);
928+
if (endpoint.binds.some((b) => b.cluster.name === 'genPollCtrl')) {
929+
await endpoint.unbind('genPollCtrl', coordinatorEndpoint);
930+
}
926931
},
927932
},
928933
{

0 commit comments

Comments
 (0)