diff --git a/esphome/components/jsn_sr04t/jsn_sr04t.cpp b/esphome/components/jsn_sr04t/jsn_sr04t.cpp index 13b5a330ef..6281cee75a 100644 --- a/esphome/components/jsn_sr04t/jsn_sr04t.cpp +++ b/esphome/components/jsn_sr04t/jsn_sr04t.cpp @@ -63,6 +63,8 @@ void Jsnsr04tComponent::check_buffer_() { case AJ_SR04M: checksum = this->buffer_[1] + this->buffer_[2]; break; + default: + return; } if (this->buffer_[3] == checksum) {