diff --git a/apps/ha/ha.app.js b/apps/ha/ha.app.js index 9ad8db8fa..d9199fb0e 100644 --- a/apps/ha/ha.app.js +++ b/apps/ha/ha.app.js @@ -16,7 +16,7 @@ function draw() { var w = g.stringWidth(trigger.display); g.setFontAlign(-1,-1); - var icon = ha.getIcon(trigger.getIcon()); + var icon = trigger.getIcon(); g.setColor(g.theme.fg).drawImage(icon, 12, H/5-2); g.drawString("Home", icon.width + 20, H/5); g.drawString("Assistant", icon.width + 18, H/5+24); @@ -50,6 +50,8 @@ Bangle.on('touch', function(btn, e){ } if(!isRight && !isLeft){ + ha.sendTrigger("TRIGGER"); + // Now send the selected trigger Bangle.buzz(80, 0.6).then(()=>{ ha.sendTrigger(triggers[position].trigger); diff --git a/apps/ha/ha.lib.js b/apps/ha/ha.lib.js index 0de98d62a..b09cbeab2 100644 --- a/apps/ha/ha.lib.js +++ b/apps/ha/ha.lib.js @@ -63,16 +63,6 @@ exports.sendTrigger = function(triggerName){ while(retries > 0){ try{ - // First send a generic trigger which can be used - // to listen to all trigger send. - Bluetooth.println(JSON.stringify({ - t:"intent", - action:"com.espruino.gadgetbridge.banglejs.HA", - extra:{ - trigger: "TRIGGER" - }}) - ); - // Now lets send the trigger that we sould send. Bluetooth.println(JSON.stringify({ t:"intent",