 #include <EEPROM.h>
 
 #define FW_NAME "homie-sonoff-touch"
-#define FW_VERSION "2.0.7"
+#define FW_VERSION "2.0.7-persistent"
 
 // Disable this if you don't want the relay to turn on with any single tap event
 

  //digitalWrite(PIN_RELAY, LOW);
  if (EEpromData.initialState)
  {
    digitalWrite(PIN_RELAY,1);
  } else {
    digitalWrite(PIN_RELAY,0);
    EEpromData.initialState=0;
  }


        relayNode.setProperty("relayState").send("ON");
        buttonNode.setProperty("event").setRetained(false).send("SINGLE");
      }
      // Read the new state, and use it to set the initial startup state
      String PIN_STATE = String(digitalRead(PIN_RELAY));
      relayNode.setProperty("relayInitMode").send(PIN_STATE);
      Serial.println("SINGLE click");
    }

