Skip to content

Commit

Permalink
add support for new service call structure
Browse files Browse the repository at this point in the history
that Visual Editor creates.
  • Loading branch information
Garfonso committed Mar 18, 2024
1 parent 7a9c1ed commit 454364e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,11 @@ class WebServer {
return; //already processed.
}

//handle new format and convert to old:
if (data.target && data.target.entity_id) {
data.service_data.entity_id = data.service_data.entity_id || data.target.entity_id;
}

let ids = [data.service_data.entity_id];
if (data.service_data.entity_id instanceof Array) {
ids = data.service_data.entity_id;
Expand Down

0 comments on commit 454364e

Please sign in to comment.