 const int PIN_LED = 13;
 const int PIN_BUTTON = 0;
 
+Bounce debouncer = Bounce(); // Bounce is built into Homie, so you can use it without including it first
+int lastbuttonState = -1;
+
 HomieNode relayNode("relay", "relay");
+HomieNode buttonNode("button", "button");
 
 bool RelayHandler(String value) {
   if (value == "ON") {

  Homie.setLoopFunction(loopHandler);
  relayNode.subscribe("relayState", RelayHandler);
  Homie.registerNode(relayNode);
  Homie.setup();
}

void loop() {
  Homie.loop();
}

#include <Homie.h>

#define FW_NAME "homie-sonoff-touch"
#define FW_VERSION "0.0.5"

/* Magic sequence for Autodetectable Binary Upload */
const char *__FLAGGED_FW_NAME = "\xbf\x84\xe4\x13\x54" FW_NAME "\x93\x44\x6b\xa7\x75";
