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.
44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
YAML
sensor:
|
|
- platform: bme280_i2c
|
|
i2c_id: i2c_bus # shared bus declared in panel.yaml — GPIO8 SDA / GPIO9 SCL
|
|
address: 0x76 # BME280 default; try 0x77 if SDO is pulled high
|
|
update_interval: 30s
|
|
temperature:
|
|
name: "Ambient Temperature"
|
|
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 °F"
|
|
args: ["x * 9.0f / 5.0f + 32.0f"]
|
|
- lvgl.label.update:
|
|
id: sensors_temp_label
|
|
text:
|
|
format: "Temperature: %.1f °F"
|
|
args: ["x * 9.0f / 5.0f + 32.0f"]
|
|
humidity:
|
|
name: "Ambient Humidity"
|
|
id: bme280_humidity
|
|
on_value:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: sensors_humidity_label
|
|
text:
|
|
format: "Humidity: %.1f %%"
|
|
args: ["x"]
|
|
pressure:
|
|
name: "Ambient Pressure"
|
|
id: bme280_pressure
|
|
on_value:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: sensors_pressure_label
|
|
text:
|
|
format: "Pressure: %.1f hPa"
|
|
args: ["x"]
|