Skip to content

Commit

Permalink
repair send message
Browse files Browse the repository at this point in the history
fixes #501
  • Loading branch information
Garfonso committed Feb 9, 2024
1 parent ca0ab74 commit b96386f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ function startAdapter(options) {
if (obj.command === 'browse') {
obj.callback && adapter.sendTo(obj.from, obj.command, adapter.apiServer.getHassStates(), obj.callback);
} else if (obj.command === 'send') {
adapter.apiServer.addNotification(obj.message).then(list =>
//*cough*
adapter.apiServer.onStateChange(adapter.namespace + '.notifications.add', {val: obj.message, ack: false}).then(list =>
obj.callback && adapter.sendTo(obj.from, obj.command, list, obj.callback));
} else if (obj.command === 'checkIdForDuplicates') {
if (obj.callback) {
Expand Down

0 comments on commit b96386f

Please sign in to comment.