i2c: - id: i2c_bus sda: GPIO8 scl: GPIO9 scan: true ch422g: - id: io_expander i2c_id: i2c_bus touchscreen: - platform: gt911 id: touch_gt911 i2c_id: i2c_bus address: 0x5D # confirmed via Waveshare's documented I2C address map interrupt_pin: GPIO4 reset_pin: ch422g: io_expander number: 1 # EXIO1 = TP_RST, per Waveshare pinout display: lcd_display display: - platform: mipi_rgb id: lcd_display model: WAVESHARE-5-1024X600 # ESPHome's closest built-in preset: same ST7701 chip, data pins, # and CH422G reset/enable wiring as this board's 1024x600 panel dimensions: width: 1024 height: 600 pad_width: 0 # the preset's default width/height (1024x600) don't match its inherited pad_height: 0 # native_width/native_height (800x480 from the base 4.3" model), which makes # ESPHome's offset math go negative unless pad is forced explicitly here enable_pin: - ch422g: io_expander number: 2 # EXIO2 = DISP (backlight enable) — inherited from the base preset - ch422g: io_expander number: 6 # EXIO6 = LCD_VDD_EN (VCOM enable) — the built-in preset doesn't set # this, but the Waveshare wiki confirms VCOM must be driven high on # this board or the panel won't display correctly. Added explicitly. lvgl: id: lvgl_comp displays: - lcd_display touchscreens: - touch_gt911 pages: - id: page_home widgets: [] - id: page_sensors widgets: [] - id: page_settings widgets: [] - id: page_schedule widgets: [] top_layer: widgets: - obj: id: nav_bar align: bottom_mid width: 100% height: 90px pad_all: 4 radius: 0 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: id: nav_btn_home width: 220px height: 78px on_click: lvgl.page.show: page_home widgets: - label: text: "Home" text_font: montserrat_20 - button: id: nav_btn_sensors width: 220px height: 78px on_click: lvgl.page.show: page_sensors widgets: - label: text: "Sensors" text_font: montserrat_20 - button: id: nav_btn_settings width: 220px height: 78px on_click: lvgl.page.show: page_settings widgets: - label: text: "Settings" text_font: montserrat_20 - button: id: nav_btn_schedule width: 220px height: 78px on_click: lvgl.page.show: page_schedule widgets: - label: text: "Schedule" text_font: montserrat_20