       irsend.sendElectraAC(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
-  }
+    default:
+      debug("Unexpected AirCon type in send request. Not sent.");
+      return false;
+  }
+  return true;  // We were successful as far as we can tell.
 }
 
 // Count how many values are in the String.

      irsend.sendLutron(code, bits, repeat);
      break;
#endif
  }
  sendReqCounter++;
  // Release the lock.
  ir_lock = false;

  // Indicate that we sent the message.
  debug("Sent the IR message.");
  debug("Type: " + String(ir_type));
  // For "long" codes we basically repeat what we got.
  if (hasACState((decode_type_t) ir_type) ||

//        e.g. "38000,9000,4500,600,1450,600,900,650,1500,..."
//        Requires at least two comma-separated values.
//        First value is the transmission frequency in Hz or kHz.
// Returns:
//   bool: Successfully sent or not.
bool parseStringAndSendRaw(const String str) {
  uint16_t count;
  uint16_t freq = 38000;  // Default to 38kHz.
  uint16_t *raw_array;
