nitaybz / homebridge-delay-switch

Delay switches for Homebridge: https://github.com/nfarina/homebridge
MIT License
146 stars 20 forks source link

Flip sensor state throws error #57

Closed rogchap closed 11 months ago

rogchap commented 2 years ago

Any time I set flipSensorState=true I always get this error:

[homebridge-delay-switch] This plugin threw an error from the characteristic 'Motion Detected': Unhandled error thrown inside read handler for characteristic: sensorType is not defined. See https://homebridge.io/w/JtMGR for more info.

I'm running Homebridge v1.4.1 and homebridge-delay-switch v3.0.3

addisonjames commented 2 years ago

I have this same issue, running HB 1.5.0 and delay 3.0.3.

jiniebot commented 2 years ago

Also having this error!

[11/07/2022, 17:27:26] [homebridge-delay-switch] This plugin threw an error from the characteristic 'Contact Sensor State': Unhandled error thrown inside read handler for characteristic: sensorType is not defined. See https://homebridge.io/w/JtMGR for more info.

When ticking "flip sensor state"

maisun commented 2 years ago

Same here, really hope this can be fixed

robjampar commented 2 years ago

Same here

garyhooper commented 1 year ago

Same here.

Cage78 commented 1 year ago

line 31 in index.js ->if (this.flipSensor && sensorType === 'motion'), there should be this. before sensorType

Ic3Nine commented 1 year ago

line 31 in index.js ->if (this.flipSensor && sensorType === 'motion'), there should be this. before sensorType

Cage's comment works like a charm. if (this.flipSensor && this.sensorType === 'motion')

nitaybz commented 11 months ago

fixed in 3.0.4