diff --git a/esphome/components/ebyte_lora/ebyte_lora_component.cpp b/esphome/components/ebyte_lora/ebyte_lora_component.cpp index 4507028f37..1830887961 100644 --- a/esphome/components/ebyte_lora/ebyte_lora_component.cpp +++ b/esphome/components/ebyte_lora/ebyte_lora_component.cpp @@ -422,21 +422,20 @@ void EbyteLoraComponent::update() { } } void EbyteLoraComponent::loop() { - std::vector data; - if (!this->available()) - return; - ESP_LOGD(TAG, "Reading serial"); - while (this->available()) { - uint8_t c; - this->read_byte(&c); - data.push_back(c); + if (this->available()) { + std::vector data; + ESP_LOGD(TAG, "Reading serial"); + while (this->available()) { + uint8_t c; + this->read_byte(&c); + data.push_back(c); + } + if (this->repeater_enabled_) { + this->repeat_message_(data); + } + this->process_(data); } - if (this->repeater_enabled_) { - this->repeat_message_(data); - } - this->process_(data); - if (this->resend_repeater_request_) this->request_repeater_info_(); if (this->updated_) {