From 17e56598c74a25551d929ffe7724ed9c29f60f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Koek?= Date: Mon, 3 Jun 2024 15:17:56 +0100 Subject: [PATCH] Update ebyte_lora_component.cpp --- esphome/components/ebyte_lora/ebyte_lora_component.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/components/ebyte_lora/ebyte_lora_component.cpp b/esphome/components/ebyte_lora/ebyte_lora_component.cpp index 2bbc1763d4..2490d655f7 100644 --- a/esphome/components/ebyte_lora/ebyte_lora_component.cpp +++ b/esphome/components/ebyte_lora/ebyte_lora_component.cpp @@ -418,7 +418,8 @@ void EbyteLoraComponent::loop() { ESP_LOGD(TAG, "Got switch info, making sure it is itself"); // Make sure it is not itself if (network_id != data[1]) { - for (int i = 2; i < data.size(); i = i + 2) { + // last data bit is rssi + for (int i = 2; i < data.size() - 1; i = i + 2) { uint8_t pin = data[i]; bool value = data[i + 1]; for (auto *sensor : this->sensors_) {