feat: scaffold classic variant with hamburger nav and reused Sensors/Settings/Schedule pages
This commit is contained in:
parent
2097779949
commit
0a6f6ab2fa
2 changed files with 297 additions and 0 deletions
245
firmware/components/display-classic.yaml
Normal file
245
firmware/components/display-classic.yaml
Normal file
|
|
@ -0,0 +1,245 @@
|
|||
lvgl:
|
||||
id: lvgl_comp
|
||||
displays:
|
||||
- lcd_display
|
||||
touchscreens:
|
||||
- touch_gt911
|
||||
pages:
|
||||
- id: page_home
|
||||
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: home_temp_label
|
||||
text: "-- °C"
|
||||
text_font: montserrat_48
|
||||
- label:
|
||||
id: home_mode_label
|
||||
text: "Mode: --"
|
||||
text_font: montserrat_28
|
||||
- label:
|
||||
align: center
|
||||
text: "Classic Home layout — coming in Task 3"
|
||||
text_font: montserrat_16
|
||||
- id: page_sensors
|
||||
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
|
||||
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:
|
||||
- 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:
|
||||
text: "Preset"
|
||||
text_font: montserrat_28
|
||||
- obj:
|
||||
width: 100%
|
||||
height: size_content
|
||||
border_width: 0
|
||||
outline_width: 0
|
||||
scrollable: false
|
||||
layout:
|
||||
type: flex
|
||||
flex_flow: row
|
||||
flex_align_cross: center
|
||||
flex_align_track: center
|
||||
flex_align_main: space_evenly
|
||||
widgets:
|
||||
- button:
|
||||
width: 300px
|
||||
height: 100px
|
||||
on_click:
|
||||
climate.control:
|
||||
id: main_thermostat
|
||||
preset: home
|
||||
widgets:
|
||||
- label:
|
||||
text: "Home"
|
||||
text_font: montserrat_28
|
||||
- button:
|
||||
width: 300px
|
||||
height: 100px
|
||||
on_click:
|
||||
climate.control:
|
||||
id: main_thermostat
|
||||
preset: away
|
||||
widgets:
|
||||
- label:
|
||||
text: "Away"
|
||||
text_font: montserrat_28
|
||||
- label:
|
||||
text: "Time-based scheduling runs in Home Assistant, not on this device."
|
||||
text_font: montserrat_16
|
||||
top_layer:
|
||||
widgets:
|
||||
- button:
|
||||
id: hamburger_btn
|
||||
align: top_left
|
||||
x: 16
|
||||
y: 16
|
||||
width: 60px
|
||||
height: 60px
|
||||
radius: 8
|
||||
on_click:
|
||||
lvgl.widget.show: nav_menu_overlay
|
||||
widgets:
|
||||
- label:
|
||||
text: "="
|
||||
text_font: montserrat_28
|
||||
- obj:
|
||||
id: nav_menu_overlay
|
||||
hidden: true
|
||||
align: top_left
|
||||
x: 16
|
||||
y: 90px
|
||||
width: 280px
|
||||
height: size_content
|
||||
pad_all: 8
|
||||
radius: 8
|
||||
layout:
|
||||
type: flex
|
||||
flex_flow: column
|
||||
flex_align_cross: stretch
|
||||
flex_align_track: start
|
||||
flex_align_main: start
|
||||
widgets:
|
||||
- button:
|
||||
on_click:
|
||||
- lvgl.page.show: page_home
|
||||
- lvgl.widget.hide: nav_menu_overlay
|
||||
widgets:
|
||||
- label:
|
||||
text: "Home"
|
||||
text_font: montserrat_20
|
||||
- button:
|
||||
on_click:
|
||||
- lvgl.page.show: page_sensors
|
||||
- lvgl.widget.hide: nav_menu_overlay
|
||||
widgets:
|
||||
- label:
|
||||
text: "Sensors"
|
||||
text_font: montserrat_20
|
||||
- button:
|
||||
on_click:
|
||||
- lvgl.page.show: page_settings
|
||||
- lvgl.widget.hide: nav_menu_overlay
|
||||
widgets:
|
||||
- label:
|
||||
text: "Settings"
|
||||
text_font: montserrat_20
|
||||
- button:
|
||||
on_click:
|
||||
- lvgl.page.show: page_schedule
|
||||
- lvgl.widget.hide: nav_menu_overlay
|
||||
widgets:
|
||||
- label:
|
||||
text: "Schedule"
|
||||
text_font: montserrat_20
|
||||
52
firmware/waveshare-thermostat-classic.yaml
Normal file
52
firmware/waveshare-thermostat-classic.yaml
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
substitutions:
|
||||
name: firecrest-classic
|
||||
friendly_name: "Firecrest Classic"
|
||||
|
||||
esphome:
|
||||
name: ${name}
|
||||
friendly_name: ${friendly_name}
|
||||
platformio_options:
|
||||
board_build.flash_mode: dio
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
variant: esp32s3
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
sdkconfig_options:
|
||||
CONFIG_ESP32S3_DATA_CACHE_64KB: y
|
||||
CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB: y
|
||||
|
||||
psram:
|
||||
mode: octal
|
||||
speed: 80MHz
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
ap:
|
||||
ssid: "${friendly_name} Fallback"
|
||||
password: "thermostat1234"
|
||||
|
||||
api:
|
||||
encryption:
|
||||
key: !secret ha_api_key
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: !secret ota_password
|
||||
|
||||
logger:
|
||||
level: DEBUG
|
||||
hardware_uart: UART0 # this board's "UART" USB-C port (used for flashing) also does log printing
|
||||
# per Waveshare's docs — ESPHome defaults S3 boards to USB_SERIAL_JTAG,
|
||||
# a different physical port, which is why logs went silent
|
||||
|
||||
packages:
|
||||
panel: !include components/panel.yaml
|
||||
display: !include components/display-classic.yaml
|
||||
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