feat: build Settings screen with device info and manual relay override
This commit is contained in:
parent
c362bbad34
commit
1d3e537df4
3 changed files with 85 additions and 1 deletions
25
firmware/components/diagnostics.yaml
Normal file
25
firmware/components/diagnostics.yaml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
text_sensor:
|
||||
- platform: wifi_info
|
||||
ip_address:
|
||||
name: "IP Address"
|
||||
id: wifi_ip_text
|
||||
on_value:
|
||||
then:
|
||||
- lvgl.label.update:
|
||||
id: settings_ip_label
|
||||
text:
|
||||
format: "IP: %s"
|
||||
args: ["x.c_str()"]
|
||||
|
||||
sensor:
|
||||
- platform: uptime
|
||||
name: "Uptime"
|
||||
id: uptime_sensor
|
||||
update_interval: 60s
|
||||
on_value:
|
||||
then:
|
||||
- lvgl.label.update:
|
||||
id: settings_uptime_label
|
||||
text:
|
||||
format: "Uptime: %.0f min"
|
||||
args: ["x / 60.0f"]
|
||||
|
|
@ -135,7 +135,65 @@ lvgl:
|
|||
text: "Pressure: -- hPa"
|
||||
text_font: montserrat_28
|
||||
- id: page_settings
|
||||
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: start
|
||||
flex_align_main: start
|
||||
widgets:
|
||||
- label:
|
||||
id: settings_ip_label
|
||||
text: "IP: --"
|
||||
text_font: montserrat_20
|
||||
- label:
|
||||
id: settings_uptime_label
|
||||
text: "Uptime: -- min"
|
||||
text_font: montserrat_20
|
||||
- label:
|
||||
text: "Manual relay override (bypasses thermostat):"
|
||||
text_font: montserrat_16
|
||||
- obj:
|
||||
width: 100%
|
||||
height: size_content
|
||||
border_width: 0
|
||||
outline_width: 0
|
||||
scrollable: false
|
||||
layout:
|
||||
type: flex
|
||||
flex_flow: row_wrap
|
||||
flex_align_cross: start
|
||||
flex_align_track: start
|
||||
flex_align_main: start
|
||||
widgets:
|
||||
- checkbox:
|
||||
text: "Fan"
|
||||
on_click:
|
||||
switch.toggle: relay_fan
|
||||
- checkbox:
|
||||
text: "Cool 1"
|
||||
on_click:
|
||||
switch.toggle: relay_cool1
|
||||
- checkbox:
|
||||
text: "Cool 2"
|
||||
on_click:
|
||||
switch.toggle: relay_cool2
|
||||
- checkbox:
|
||||
text: "Heat 1"
|
||||
on_click:
|
||||
switch.toggle: relay_heat1
|
||||
- checkbox:
|
||||
text: "Heat 2"
|
||||
on_click:
|
||||
switch.toggle: relay_heat2
|
||||
- id: page_schedule
|
||||
widgets: []
|
||||
top_layer:
|
||||
|
|
|
|||
|
|
@ -48,3 +48,4 @@ packages:
|
|||
sensors: !include components/sensors.yaml
|
||||
relays: !include components/relays.yaml
|
||||
climate: !include components/climate.yaml
|
||||
diagnostics: !include components/diagnostics.yaml
|
||||
|
|
|
|||
Loading…
Reference in a new issue