   int oldValue = EEpromData.initialState;
   if (value.toInt() == 1 or value=="ON")
   {
-    relayNode.setProperty("relayInitMode").send("1");
+    relayNode.setProperty("relayInitMode").setRetained(false).send("1");
     EEpromData.initialState=1;
   } else {
-    relayNode.setProperty("relayInitMode").send( "0");
+    relayNode.setProperty("relayInitMode").setRetained(false).send( "0");
     EEpromData.initialState=0;
   }
   if (oldValue!=EEpromData.initialState)


#define FW_NAME "homie-sonoff-touch"
// Version number, with letter suffix for any library changes
#define FW_VERSION "2.0.9c"

// Disable this if you don't want the relay to turn on with any single tap event


  HomieRange emptyRange;
  if (EEpromData.initialState) {
    RelayHandler(emptyRange, "ON");
    relayNode.setProperty("relayInitMode").setRetained(false).send("1");
  } else {
    RelayHandler(emptyRange, "OFF");
    relayNode.setProperty("relayInitMode").setRetained(false).send("0");
  }
  String outMsg = String(EEpromData.keepAliveTimeOut);
  keepAliveNode.setProperty("timeOut").send(outMsg);
