From 954d4c746b281c4778a107f243577681503da7f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Koek?= Date: Fri, 4 Oct 2024 12:32:25 +0100 Subject: [PATCH] Update ebyte_lora_component.cpp --- esphome/components/ebyte_lora/ebyte_lora_component.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/esphome/components/ebyte_lora/ebyte_lora_component.cpp b/esphome/components/ebyte_lora/ebyte_lora_component.cpp index d823ffb10a..1a72e7d126 100644 --- a/esphome/components/ebyte_lora/ebyte_lora_component.cpp +++ b/esphome/components/ebyte_lora/ebyte_lora_component.cpp @@ -556,12 +556,12 @@ void EbyteLoraComponent::send_data_(bool all) { for (auto &sensor : this->sensors_) { if (all || sensor.updated) { sensor.updated = false; - FuData udata{.f32 = sensor.sensor->get_state()}; + uint32_t u32 = sensor.sensor->get_state(); data.push_back(SENSOR_KEY); - data.push_back(udata.u32 & 0xFF); - data.push_back((udata.u32 >> 8) & 0xFF); - data.push_back((udata.u32 >> 16) & 0xFF); - data.push_back((udata.u32 >> 24) & 0xFF); + data.push_back(u32 & 0xFF); + data.push_back((u32 >> 8) & 0xFF); + data.push_back((u32 >> 16) & 0xFF); + data.push_back((u32 >> 24) & 0xFF); // add all the sensor date info auto len = strlen(sensor.id); data.push_back(len);