From 05c76d1134a73193c11cf7d7521b686b6e48a4d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Koek?= Date: Fri, 4 Oct 2024 14:53:18 +0100 Subject: [PATCH] Update ebyte_lora_component.cpp --- esphome/components/ebyte_lora/ebyte_lora_component.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/esphome/components/ebyte_lora/ebyte_lora_component.cpp b/esphome/components/ebyte_lora/ebyte_lora_component.cpp index 5bdd7feb89..d76300a18c 100644 --- a/esphome/components/ebyte_lora/ebyte_lora_component.cpp +++ b/esphome/components/ebyte_lora/ebyte_lora_component.cpp @@ -339,11 +339,16 @@ void EbyteLoraComponent::set_mode_(ModeType mode) { return; } // no need to do anything if the mode is correct - if (mode == this->get_mode_()) { + if (this->get_mode_() == mode) { this->config_mode_ = mode; ESP_LOGD(TAG, "Mode is already correct"); return; } + // no need to do anything if the mode is correct + if (!this->can_send_message_()) { + ESP_LOGD(TAG, "Device busy lets wait"); + return; + } switch (mode) { case NORMAL: // Mode 0 | normal operation