Skip to content

Commit

Permalink
Removed obsolete current door state characteristic.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Sowen committed Mar 13, 2021
1 parent b095edd commit 337b18c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <marc.sowen@gmail.com>",
Expand Down
7 changes: 7 additions & 0 deletions src/devices/HmIPContactSensor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

0 comments on commit 337b18c

Please sign in to comment.