Skip to content

Commit

Permalink
Third Reality devices don't change zoneState
Browse files Browse the repository at this point in the history
Like Tuya devices, Third Reality devices (contact sensor and motion sensor which I will add support for soon) appear to not change zoneState after enroll which leads to a failed interview even though the devices work properly

See Koenkk/zigbee2mqtt#4655
  • Loading branch information
M.J. Wydra committed Sep 10, 2021
1 parent 88c3f98 commit 98d8bc5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/controller/model/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,16 @@ class Device extends Entity {
return true;
}

// Similar to TuYa devices, Third Reality devices don't change zoneState after enroll
if this.modelID?.match('^3R.*?Z') {
this._powerSource = this._powerSource || 'Battery';
this._interviewing = false;
this._interviewCompleted = true;
this.save();
debug.log(`Interview - quirks matched for Third Reality end device`);
return true;
}

// Some devices, e.g. Xiaomi end devices have a different interview procedure, after pairing they
// report it's modelID trough a readResponse. The readResponse is received by the controller and set
// on the device.
Expand Down

0 comments on commit 98d8bc5

Please sign in to comment.