From 4ed78023b6605afcec5570a98bfae1e61e85b500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20de=20Le=C3=B3n?= Date: Mon, 3 Mar 2025 15:06:30 -0600 Subject: [PATCH] [bmp085] Fix error in read of pressure (#8359) --- esphome/components/bmp085/bmp085.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/bmp085/bmp085.cpp b/esphome/components/bmp085/bmp085.cpp index 44e686fe1a..caf2264390 100644 --- a/esphome/components/bmp085/bmp085.cpp +++ b/esphome/components/bmp085/bmp085.cpp @@ -95,7 +95,7 @@ void BMP085Component::read_pressure_() { return; } - uint32_t value = (uint32_t(buffer[0]) << 16) | (uint32_t(buffer[1]) << 8) | uint32_t(buffer[0]); + uint32_t value = (uint32_t(buffer[0]) << 16) | (uint32_t(buffer[1]) << 8) | uint32_t(buffer[2]); if ((value >> 5) == 0) { ESP_LOGW(TAG, "Invalid pressure!"); this->status_set_warning();