40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
sensor:
|
|
- platform: bme280_i2c
|
|
i2c_id: i2c_bus # shared bus declared in display.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:
|
|
- lvgl.label.update:
|
|
id: home_temp_label
|
|
text:
|
|
format: "%.1f °C"
|
|
args: ["x"]
|
|
- lvgl.label.update:
|
|
id: sensors_temp_label
|
|
text:
|
|
format: "Temperature: %.1f °C"
|
|
args: ["x"]
|
|
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"]
|