 HomieNode keepAliveNode("keepalive", "keepalive");
 HomieNode watchDogNode("watchdog", "Watchdog mode");
 
-/*
- * Recevied tick message for watchdog
- */
-bool watchdogTickHandler(const HomieRange& range, const String& value)
-{
+bool watchdogTickHandler(const HomieRange& range, const String& value) {
+  // Recevied tick message for watchdog
   if (value == "0")
   {
     watchDogCounterStart = 0;

  return true;
}

/*
 * Keepliave tick handler
 */
bool keepAliveTickHandler(HomieRange range, String value)
{
  keepAliveReceived=millis();
  return true;
}

/*
 * Keepalive message handler
 */
bool keepAliveTimeOutHandler(HomieRange range, String value)
{
  int oldValue = EEpromData.keepAliveTimeOut;
  if (value.toInt() > 0)
  {

// Milliseconds to wait per cycle for a held command.
const int waitInterval = 100;

struct EEpromDataStruct {
  // EEPROM structure
  int keepAliveTimeOut; // 0 - disabled, keepalive time - seconds
  bool initialState;  // Initial state (just after boot - homie independet)
  int watchDogTimeOut; // 0 - disabled, watchdog time limit - seconds
