Skip to content

Commit

Permalink
Fix JTQJBF01LMBW and JTYJGD01LMBW selftest and sensitivity timeout. K…
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Nov 7, 2019
1 parent 58d6238 commit caf0e38
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions converters/toZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,9 @@ const converters = {


if (lookup.hasOwnProperty(value)) {
await entity.write('ssIasZone', {0xFFF1: {value: lookup[value], type: 0x23}}, options.xiaomi);
// Timeout of 30 seconds + required (https://github.com/Koenkk/zigbee2mqtt/issues/2287)
const opts = {...options.xiaomi, timeout: 35000};
await entity.write('ssIasZone', {0xFFF1: {value: lookup[value], type: 0x23}}, opts);
}

return {state: {sensitivity: value}};
Expand All @@ -659,7 +661,9 @@ const converters = {
JTQJBF01LMBW_JTYJGD01LMBW_selfest: {
key: ['selftest'],
convertSet: async (entity, key, value, meta) => {
await entity.write('ssIasZone', {0xFFF1: {value: 0x03010000, type: 0x23}}, options.xiaomi);
// Timeout of 30 seconds + required (https://github.com/Koenkk/zigbee2mqtt/issues/2287)
const opts = {...options.xiaomi, timeout: 35000};
await entity.write('ssIasZone', {0xFFF1: {value: 0x03010000, type: 0x23}}, opts);
},
},
xiaomi_switch_operation_mode: {
Expand Down

0 comments on commit caf0e38

Please sign in to comment.