feat: build Sensors screen with live temp/humidity/pressure readout
This commit is contained in:
parent
d051f0cab0
commit
c362bbad34
2 changed files with 46 additions and 1 deletions
|
|
@ -107,7 +107,33 @@ lvgl:
|
||||||
text: "+"
|
text: "+"
|
||||||
text_font: montserrat_40
|
text_font: montserrat_40
|
||||||
- id: page_sensors
|
- id: page_sensors
|
||||||
widgets: []
|
widgets:
|
||||||
|
- obj:
|
||||||
|
width: 100%
|
||||||
|
height: 510px
|
||||||
|
pad_all: 16
|
||||||
|
border_width: 0
|
||||||
|
outline_width: 0
|
||||||
|
scrollable: false
|
||||||
|
layout:
|
||||||
|
type: flex
|
||||||
|
flex_flow: column
|
||||||
|
flex_align_cross: center
|
||||||
|
flex_align_track: center
|
||||||
|
flex_align_main: space_evenly
|
||||||
|
widgets:
|
||||||
|
- label:
|
||||||
|
id: sensors_temp_label
|
||||||
|
text: "Temperature: -- °C"
|
||||||
|
text_font: montserrat_28
|
||||||
|
- label:
|
||||||
|
id: sensors_humidity_label
|
||||||
|
text: "Humidity: -- %"
|
||||||
|
text_font: montserrat_28
|
||||||
|
- label:
|
||||||
|
id: sensors_pressure_label
|
||||||
|
text: "Pressure: -- hPa"
|
||||||
|
text_font: montserrat_28
|
||||||
- id: page_settings
|
- id: page_settings
|
||||||
widgets: []
|
widgets: []
|
||||||
- id: page_schedule
|
- id: page_schedule
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,28 @@ sensor:
|
||||||
text:
|
text:
|
||||||
format: "%.1f °C"
|
format: "%.1f °C"
|
||||||
args: ["x"]
|
args: ["x"]
|
||||||
|
- lvgl.label.update:
|
||||||
|
id: sensors_temp_label
|
||||||
|
text:
|
||||||
|
format: "Temperature: %.1f °C"
|
||||||
|
args: ["x"]
|
||||||
humidity:
|
humidity:
|
||||||
name: "Ambient Humidity"
|
name: "Ambient Humidity"
|
||||||
id: bme280_humidity
|
id: bme280_humidity
|
||||||
|
on_value:
|
||||||
|
then:
|
||||||
|
- lvgl.label.update:
|
||||||
|
id: sensors_humidity_label
|
||||||
|
text:
|
||||||
|
format: "Humidity: %.1f %%"
|
||||||
|
args: ["x"]
|
||||||
pressure:
|
pressure:
|
||||||
name: "Ambient Pressure"
|
name: "Ambient Pressure"
|
||||||
id: bme280_pressure
|
id: bme280_pressure
|
||||||
|
on_value:
|
||||||
|
then:
|
||||||
|
- lvgl.label.update:
|
||||||
|
id: sensors_pressure_label
|
||||||
|
text:
|
||||||
|
format: "Pressure: %.1f hPa"
|
||||||
|
args: ["x"]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue