Skip to content

Commit

Permalink
1.5.24
Browse files Browse the repository at this point in the history
Added token for previous state to app trigger 'entity state changed'.
  • Loading branch information
RonnyWinkler committed Jun 30, 2024
1 parent 9e5429a commit ebb7d78
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .homeychangelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,10 @@
"1.5.23": {
"en": "Changed app trigger 'entity state changed' to autocomplete field.",
"de": "App-Trigger 'Entitäts-Status geändert' zu Autocomplete-Feld geändert."
},
"1.5.24": {
"en": "Added token for previous state to app trigger 'entity state changed'.",
"de": "Token für vorherigen Status zu App-Trigger 'Entitäts-Status geändert' hinzugefügt."
}

}
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.23",
"version": "1.5.24",
"compatibility": ">=8.1.0",
"sdk": 3,
"brandColor": "#0DA6EA",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
"de": "Entitätsstatus",
"nl": "Entiteitsstatus"
}
},
{
"name": "state_old",
"type": "string",
"title": {
"en": "Previous entity state",
"de": "Vorheriger Entitätsstatus",
"nl": "Vorige entiteitsstatus"
}
}
],
"args": [
Expand Down
11 changes: 10 additions & 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.23",
"version": "1.5.24",
"compatibility": ">=8.1.0",
"sdk": 3,
"brandColor": "#0DA6EA",
Expand Down Expand Up @@ -630,6 +630,15 @@
"de": "Entitätsstatus",
"nl": "Entiteitsstatus"
}
},
{
"name": "state_old",
"type": "string",
"title": {
"en": "Previous entity state",
"de": "Vorheriger Entitätsstatus",
"nl": "Vorige entiteitsstatus"
}
}
],
"args": [
Expand Down
3 changes: 2 additions & 1 deletion lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,8 @@ class Client extends Homey.SimpleClass {
// this._app.log("HA event: ", event.event_type, " Entity: ",entityId);
let tokens = {
entity: event.entity_id,
state: event.new_state.state
state: event.new_state.state,
state_old: event.old_state.state
};
let state = {
entity: event.entity_id,
Expand Down

0 comments on commit ebb7d78

Please sign in to comment.