Skip to content

Commit

Permalink
1.5.19
Browse files Browse the repository at this point in the history
1.5.18 Fixed 'triggered' state for alarm panel device.
1.5.19 Added error handling for invalid entity data in compound device.
  • Loading branch information
RonnyWinkler committed Feb 29, 2024
1 parent 2a5774f commit 7f0a0b5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
8 changes: 8 additions & 0 deletions .homeychangelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}

}
2 changes: 1 addition & 1 deletion .homeycompose/app.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion drivers/alarm_control_panel/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
8 changes: 4 additions & 4 deletions drivers/compound/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down

0 comments on commit 7f0a0b5

Please sign in to comment.