diff --git a/apps/ha/ha.lib.js b/apps/ha/ha.lib.js index 9aa13303d..9b16a25cc 100644 --- a/apps/ha/ha.lib.js +++ b/apps/ha/ha.lib.js @@ -78,3 +78,13 @@ exports.sendTrigger = function(triggerName){ } } } + +exports.sendValue = function(trigger, value){ + Bluetooth.println( + JSON.stringify({ + t: "intent", + action: "com.espruino.gadgetbridge.banglejs.HA", + extra: { trigger, value }, + }) + ); +};