From a0734891adccca3d7d27d7a2f663fa2d491f67c3 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Sun, 12 Jul 2026 14:26:27 -0700 Subject: [PATCH] fix: display BME280 ambient temperature in Fahrenheit, not Celsius sensors.yaml formatted the raw BME280 reading directly with no unit conversion, inconsistent with the dial setpoints and weather widget, which are already Fahrenheit. Converts at the only point this sensor's value reaches the UI (shared by every display variant); climate.yaml's internal Celsius values are untouched since ESPHome's climate component always operates in Celsius regardless of display unit. --- firmware/components/display-classic.yaml | 4 ++-- firmware/components/display.yaml | 4 ++-- firmware/components/sensors.yaml | 12 ++++++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/firmware/components/display-classic.yaml b/firmware/components/display-classic.yaml index 9c88272..5f58d5b 100644 --- a/firmware/components/display-classic.yaml +++ b/firmware/components/display-classic.yaml @@ -222,7 +222,7 @@ lvgl: text_font: montserrat_20 - label: id: home_temp_label - text: "-- °C" + text: "-- °F" text_font: montserrat_48 - button: align: bottom_left @@ -334,7 +334,7 @@ lvgl: widgets: - label: id: sensors_temp_label - text: "Temperature: -- °C" + text: "Temperature: -- °F" text_font: montserrat_28 - label: id: sensors_humidity_label diff --git a/firmware/components/display.yaml b/firmware/components/display.yaml index fbeadcb..5470de2 100644 --- a/firmware/components/display.yaml +++ b/firmware/components/display.yaml @@ -23,7 +23,7 @@ lvgl: widgets: - label: id: home_temp_label - text: "-- °C" + text: "-- °F" text_font: montserrat_48 - label: id: home_mode_label @@ -84,7 +84,7 @@ lvgl: widgets: - label: id: sensors_temp_label - text: "Temperature: -- °C" + text: "Temperature: -- °F" text_font: montserrat_28 - label: id: sensors_humidity_label diff --git a/firmware/components/sensors.yaml b/firmware/components/sensors.yaml index 99bb40b..1b5ad6b 100644 --- a/firmware/components/sensors.yaml +++ b/firmware/components/sensors.yaml @@ -8,16 +8,20 @@ sensor: id: bme280_temperature on_value: then: + # BME280 reports Celsius natively; converted to Fahrenheit here (the only place + # this sensor's value reaches the UI) to match the dial setpoints and weather + # widget, which are already Fahrenheit. Not a dynamic HA unit-system sync — ESPHome + # has no standard entity exposing that setting — just a fixed display convention. - lvgl.label.update: id: home_temp_label text: - format: "%.1f °C" - args: ["x"] + format: "%.1f °F" + args: ["x * 9.0f / 5.0f + 32.0f"] - lvgl.label.update: id: sensors_temp_label text: - format: "Temperature: %.1f °C" - args: ["x"] + format: "Temperature: %.1f °F" + args: ["x * 9.0f / 5.0f + 32.0f"] humidity: name: "Ambient Humidity" id: bme280_humidity