Skip to content

Commit

Permalink
fix(pir): don't double poll PIR sensor
Browse files Browse the repository at this point in the history
- both the PIAccessory and BaseAccessory were listening to `REQUEST_STATE_UPDATE``
- this lead to two *very* rapid subsequent calls which brings *real* PIR sensors to their knees
- (also) fixes #152
  • Loading branch information
johannrichard committed Nov 30, 2020
1 parent 710a6e6 commit 40aa563
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/myStromPIRAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,6 @@ export class MyStromPIRAccessory extends DingzDaBaseAccessory {
'Motion',
);

// Subscribe to the REQUEST_STATE_UPDATE event
this.platform.eb.on(
PlatformEvent.REQUEST_STATE_UPDATE,
this.getDeviceStateUpdate.bind(this),
);

if (!(this.platform.config.motionPoller ?? true)) {
// Implement *push* event handling
this.platform.eb.on(PlatformEvent.ACTION, (mac, action) => {
Expand Down

0 comments on commit 40aa563

Please sign in to comment.