From e624c7e2757d0a2f08ca020273a139ec0a240a7b Mon Sep 17 00:00:00 2001 From: thetestspecimen Date: Tue, 8 Oct 2024 01:08:06 +0300 Subject: [PATCH] Update formatting --- esphome/components/sen0501/sen0501.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/components/sen0501/sen0501.cpp b/esphome/components/sen0501/sen0501.cpp index b3aa35b11e..f5b3c06b6b 100644 --- a/esphome/components/sen0501/sen0501.cpp +++ b/esphome/components/sen0501/sen0501.cpp @@ -160,9 +160,10 @@ void Sen0501Component::read_atmospheric_pressure_() { uint16_t atmosphere = encode_uint16(buffer[0], buffer[1]); if (this->atmospheric_pressure_ != nullptr) this->atmospheric_pressure_->publish_state(atmosphere); - if (this->elevation_ != nullptr) + if (this->elevation_ != nullptr) { float elevation = 44330 * (1.0 - pow(atmosphere / 1015.0f, 0.1903)); this->elevation_->publish_state(elevation); + } } } // namespace sen0501