Skip to content

Instantly share code, notes, and snippets.

@Dan-Q
Created June 22, 2022 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dan-Q/711ab041c0c8bdcac7c07d5c641c0fdd to your computer and use it in GitHub Desktop.
Save Dan-Q/711ab041c0c8bdcac7c07d5c641c0fdd to your computer and use it in GitHub Desktop.
const webHook = '[HUGINN WEBHOOK URL]';
const buttonManager = require('buttons')
const http = require('http');
buttonManager.on('buttonSingleOrDoubleClickOrHold', function(obj){
http.makeRequest({
url: webHook,
method: 'POST',
headers: {'Content-Type': 'application/json'},
content: JSON.stringify(obj),
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment