diff --git a/.homeychangelog.json b/.homeychangelog.json index f6a3718..2fd107b 100644 --- a/.homeychangelog.json +++ b/.homeychangelog.json @@ -554,6 +554,14 @@ "1.5.17": { "en": "Added 'The alarm or switch turned on' trigger to compound device.", "de": "'Der Alarm oder Schalter ist angegangen' Trigger zu Compound Gerät hinzugefügt." + }, + "1.5.18": { + "en": "Fixed 'triggered' state for alarm panel device.", + "de": "'triggered' Status für Alarmpanel-Gerät korrigiert." + }, + "1.5.19": { + "en": "Added error handling for invalid entity data in compound device.", + "de": "Fehlerbehandlung für ungültige Werte in Compound Gerät ergänzt." } } diff --git a/.homeycompose/app.json b/.homeycompose/app.json index ca8c6b9..6175c97 100644 --- a/.homeycompose/app.json +++ b/.homeycompose/app.json @@ -1,6 +1,6 @@ { "id": "io.home-assistant.community", - "version": "1.5.17", + "version": "1.5.19", "compatibility": ">=8.1.0", "sdk": 3, "brandColor": "#0DA6EA", diff --git a/app.json b/app.json index b221587..14874ac 100644 --- a/app.json +++ b/app.json @@ -1,7 +1,7 @@ { "_comment": "This file is generated. Please edit .homeycompose/app.json instead.", "id": "io.home-assistant.community", - "version": "1.5.17", + "version": "1.5.19", "compatibility": ">=8.1.0", "sdk": 3, "brandColor": "#0DA6EA", diff --git a/drivers/alarm_control_panel/device.js b/drivers/alarm_control_panel/device.js index 9e5dc10..99eed33 100644 --- a/drivers/alarm_control_panel/device.js +++ b/drivers/alarm_control_panel/device.js @@ -74,7 +74,7 @@ class AlarmControlPanelDevice extends BaseDevice { } else{ this.homey.app._flowTriggerAlarmControlPanelTriggered.trigger(this, {}, {}); - await this.setCapabilityValue("alarm_control_panel_alarm", true); + await this.setCapabilityValue("alarm_control_panel_alarm", state); } } catch(error){ diff --git a/drivers/compound/device.js b/drivers/compound/device.js index 3da7b0f..b285f11 100644 --- a/drivers/compound/device.js +++ b/drivers/compound/device.js @@ -219,25 +219,25 @@ class CompoundDevice extends BaseDevice { switch (this.getCapabilityType(key)){ case "string": tokens.value_string = value; - if (oldValue != undefined){ + if (oldValue != undefined && oldValue != null){ tokens.value_string_old = oldValue; } break; case "number": tokens.value_number = value; - if (oldValue != undefined){ + if (oldValue != undefined && oldValue != null){ tokens.value_number_old = oldValue; } break; case "boolean": tokens.value_boolean = value; - if (oldValue != undefined){ + if (oldValue != undefined && oldValue != null){ tokens.value_boolean_old = oldValue; } break; } if (this.homey.app){ - this.homey.app._flowTriggerCapabilityChanged.trigger(this, tokens, state); + this.homey.app._flowTriggerCapabilityChanged.trigger(this, tokens, state).catch(error => {this.log("Error triggering flow [capability_changed]: "+error.message)}); // additional alarm on/off trigger if (key.startsWith("alarm") || key.startsWith("onoff")){ if (value){