From 1d3e537df4e7c99240255223c4db24e2d42db2ce Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Sat, 11 Jul 2026 22:52:31 -0700 Subject: [PATCH] feat: build Settings screen with device info and manual relay override --- firmware/components/diagnostics.yaml | 25 ++++++++++++ firmware/components/display.yaml | 60 +++++++++++++++++++++++++++- firmware/waveshare-thermostat.yaml | 1 + 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 firmware/components/diagnostics.yaml diff --git a/firmware/components/diagnostics.yaml b/firmware/components/diagnostics.yaml new file mode 100644 index 0000000..8a91790 --- /dev/null +++ b/firmware/components/diagnostics.yaml @@ -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"] diff --git a/firmware/components/display.yaml b/firmware/components/display.yaml index 7025f64..cf5d716 100644 --- a/firmware/components/display.yaml +++ b/firmware/components/display.yaml @@ -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: diff --git a/firmware/waveshare-thermostat.yaml b/firmware/waveshare-thermostat.yaml index f1d9d69..37301d8 100644 --- a/firmware/waveshare-thermostat.yaml +++ b/firmware/waveshare-thermostat.yaml @@ -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