ha: add lib.sendValue()

pull/3375/head
Rob Pilling 2024-04-21 19:30:52 +01:00
parent bcffdef85b
commit a610833bd7
1 changed files with 10 additions and 0 deletions

View File

@ -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 },
})
);
};