diff --git a/accessories/contactsensor.js b/accessories/contactsensor.js index 0a436dd..1dcd8a0 100644 --- a/accessories/contactsensor.js +++ b/accessories/contactsensor.js @@ -32,10 +32,12 @@ class ContactSensor extends VerisureAccessory { const { Service, Characteristic } = this.homebridge.hap; this.service = new Service.ContactSensor(this.name); - this.service + const currentStateCharacteristic = this.service .getCharacteristic(Characteristic.ContactSensorState) .on('get', this.getCurrentSensorState.bind(this)); + this.pollCharacteristics.push(currentStateCharacteristic); + return [this.accessoryInformation, this.service]; } }