diff --git a/CHANGELOG.md b/CHANGELOG.md index ee0f4e9..99fd808 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.3.7 (2021-03-13) + +### Bugfix + +- **General**: Fixed tampered state mapping. + ## 0.3.6 (2021-03-13) ### Improvements diff --git a/package.json b/package.json index 922fb0a..77d30c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homebridge-homematicip", - "version": "0.3.6", + "version": "0.3.7", "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 2491f61..700e6bb 100644 --- a/src/devices/HmIPContactSensor.ts +++ b/src/devices/HmIPContactSensor.ts @@ -71,7 +71,9 @@ export class HmIPContactSensor extends HmIPGenericDevice implements Updateable { } handleStatusTamperedGet(callback: CharacteristicGetCallback) { - callback(null, this.sabotage); + callback(null, this.sabotage + ? this.platform.Characteristic.StatusTampered.TAMPERED + : this.platform.Characteristic.StatusTampered.NOT_TAMPERED); } public updateDevice(hmIPDevice: HmIPDevice, groups: { [key: string]: HmIPGroup }) { @@ -99,7 +101,9 @@ export class HmIPContactSensor extends HmIPGenericDevice implements Updateable { if (sabotageChannel.sabotage != null && sabotageChannel.sabotage !== this.sabotage) { this.sabotage = sabotageChannel.sabotage; this.platform.log.info('Sabotage state of %s changed to %s', this.accessory.displayName, this.sabotage); - this.service.updateCharacteristic(this.platform.Characteristic.StatusTampered, this.sabotage); + this.service.updateCharacteristic(this.platform.Characteristic.StatusTampered, this.sabotage + ? this.platform.Characteristic.StatusTampered.TAMPERED + : this.platform.Characteristic.StatusTampered.NOT_TAMPERED); } } } diff --git a/src/settings.ts b/src/settings.ts index 39b56f2..5f034e0 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.6'; +export const PLUGIN_VERSION = '0.3.7';