From 337b18c6911d2ed26383a92e0dc9426984872799 Mon Sep 17 00:00:00 2001 From: Marc Sowen Date: Sat, 13 Mar 2021 17:45:20 +0100 Subject: [PATCH] Removed obsolete current door state characteristic. --- CHANGELOG.md | 6 ++++++ package.json | 2 +- src/devices/HmIPContactSensor.ts | 7 +++++++ src/settings.ts | 2 +- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28a21c6..fe01980 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.3.2 (2021-03-13) + +### Improvements + +- **ContactSensor**: Removed obsolete current door state characteristic. + ## 0.3.1 (2021-03-13) ### Improvements diff --git a/package.json b/package.json index b10dac8..b03b7bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homebridge-homematicip", - "version": "0.3.1", + "version": "0.3.2", "description": "Homematic IP plugin for homebridge", "license": "Apache-2.0", "author": "Marc Sowen ", diff --git a/src/devices/HmIPContactSensor.ts b/src/devices/HmIPContactSensor.ts index 2e850f1..795c493 100644 --- a/src/devices/HmIPContactSensor.ts +++ b/src/devices/HmIPContactSensor.ts @@ -51,6 +51,13 @@ export class HmIPContactSensor extends HmIPGenericDevice implements Updateable { this.service.getCharacteristic(this.platform.Characteristic.ContactSensorState) .on('get', this.handleContactSensorStateGet.bind(this)); + const doorCharacteristics = this.service.getCharacteristic(this.platform.Characteristic.CurrentDoorState); + + if (doorCharacteristics != undefined) { + this.platform.log.info("Removing obsolete current door state characteristic from %s", accessory.context.device.label); + this.service.removeCharacteristic(doorCharacteristics); + } + this.updateDevice(accessory.context.device, platform.groups); } diff --git a/src/settings.ts b/src/settings.ts index 0997f05..b23bc16 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -11,4 +11,4 @@ export const PLUGIN_NAME = 'homebridge-homematicip'; /** * Version to be used in protocol communication */ -export const PLUGIN_VERSION = '0.3.1'; +export const PLUGIN_VERSION = '0.3.2';