From 6321b2ca20883f10cbcc3dce95be57825b9be086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl-Petter=20=C3=85kesson?= Date: Fri, 23 Jan 2026 20:59:31 +0100 Subject: [PATCH 01/10] Add support for Waveshare ESP32-C6-LCD-1.47 --- .../hardware/waveshare-esp32-c6-lcd-1.47.yaml | 266 ++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml diff --git a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml new file mode 100644 index 00000000..0be11c09 --- /dev/null +++ b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml @@ -0,0 +1,266 @@ +# ============================================================================ +# ESPHome YAML - Generated by ESPHome Designer +# ============================================================================ +# TARGET DEVICE: Waveshare ESP32-C6 LCD 1.47" 172x320 +# - https://www.waveshare.com/esp32-c6-lcd-1.47.htm +# - Display Platform: ili9xxx +# - PSRAM: Yes (Octal, 80MHz) +# - Touchscreen: CST816S (I2C) +# - Framework: ESP-IDF with execute_from_psram +# Name: Waveshare ESP32-C6 LCD 1.47" +# Resolution: 172x320 +# Shape: rectangle +# ============================================================================ +# +# ============================================================================ +# +# SETUP INSTRUCTIONS: +# +# STEP 1: Copy the Material Design Icons font file +# - From this repo: resources/fonts/materialdesignicons-webfont.ttf +# - To ESPHome: /config/esphome/fonts/materialdesignicons-webfont.ttf +# (Create the fonts folder if it doesn't exist) +# +# STEP 2: Create a new device in ESPHome +# - Click "New Device" +# - Name: your-device-name +# - Select: ESP32-C6 +# - Framework: ESP-IDF (Required for this device) +# +# STEP 3: REPLACE your entire YAML with this generated output +# (This profile includes full esphome: and esp32: sections) +# +# ============================================================================ + +substitutions: + name: "waveshare_esp32_c6_lcd_147" + id: esp32_c6_lcd_147 + friendly_name: "Waveshare ESP32-C6-LCD-1.47\"" + device_description: "Waveshare ESP32-C6 LCD 1.47 inch" + project_name: "ESPHomeDesigner_Waveshare_LCD_1.47" + project_version: "1.0.0" + #GPIO pins for the LCD screen and SD Card + rstpin: GPIO21 + dcpin: GPIO15 + blpin: GPIO22 + clkpin: GPIO7 + mosipin: GPIO6 + misopin: GPIO5 + cspin: GPIO14 + # GPIO pins for i2c + sdapin: GPIO1 + sclpin: GPIO2 + # SD Card + sd_cs_pin: GPIO4 + # LED + rgb_led: GPIO8 + # One Wire + one_wire: GPIO10 + logger: "DEBUG" + +esphome: + min_version: 2025.12.0 + name: "${name}" + friendly_name: "${friendly_name}" + project: + name: "${project_name}" + version: "${project_version}" + +esp32: + board: esp32-c6-devkitc-1 + variant: esp32c6 + flash_size: 4MB + framework: + type: esp-idf + sdkconfig_options: + CONFIG_ESPTOOLPY_FLASHSIZE_DETECT: y + CONFIG_ESPTOOLPY_FLASHSIZE_4MB: y + CONFIG_OPENTHREAD_ENABLED: n + CONFIG_USE_MINIMAL_MDNS: y + # Memory optimization + COMPILER_OPTIMIZATION_SIZE: y + COMPILER_OPTIMIZATION_LEVEL_RELEASE: y + CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE: y + CONFIG_HEAP_POISONING_DISABLED: y + +esphome: + friendly_name: $friendly_name + name: $name + project: + name: "${project_name}" + version: "${project_version}" + platformio_options: + board_build.flash_mode: dio + build_flags: + - "-DI2C_NUM_1=I2C_NUM_0" + - "-DBOARD_HAS_PSRAM" + - "-Wl,-Map,output.map" + board_build.arduino.memory_type: qio_opi + +# Enable Home Assistant API +api: + encryption: + key: !secret encryption_key + +ota: + - platform: esphome + id: my_ota + password: !secret ota_password + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + +# Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "${name}" + password: !secret wifi_fallback_password + +logger: + level: $logger + +captive_portal: + +spi: + mosi_pin: $mosipin + miso_pin: $misopin + clk_pin: $clkpin + +i2c: + sda: $sdapin + scl: $sclpin + +one_wire: + - pin: $one_wire + platform: gpio + +text_sensor: + # ESPHome Version + - platform: version + name: "ESPHome Version" + id: "${id}_esphome_version" + icon: si:esphomes + hide_timestamp: 'true' + entity_category: diagnostic + # WiFi Info: IP, MAC, SSID, BSSID, Scan + - platform: wifi_info + ip_address: + name: "IP Address" + icon: mdi:ip + entity_category: diagnostic + disabled_by_default: True + mac_address: + name: "WiFi MAC Address" + icon: mdi:fingerprint + entity_category: diagnostic + disabled_by_default: True + ssid: + name: "Connected SSID" + icon: mdi:wifi-settings + entity_category: diagnostic + disabled_by_default: True + bssid: + name: "Connected BSSID" + icon: mdi:wifi + entity_category: diagnostic + disabled_by_default: True + scan_results: + name: "Latest Scan Results" + icon: mdi:wifi-sync + entity_category: diagnostic + disabled_by_default: True + +binary_sensor: + # https://esphome.io/components/binary_sensor/status.html + # Reports if this device is Connected or not + - platform: status + name: "Status" + id: "${id}_status" + icon: mdi:check-network + entity_category: diagnostic + +light: + # RGB LED + - platform: esp32_rmt_led_strip + pin: + number: $rgb_led + ignore_strapping_warning: true + name: "RGB LED" + id: rgb_led + chipset: ws2812 + num_leds: 1 + rgb_order: RGB + # gamma_correct: 2.8 + default_transition_length: 2s + restore_mode: RESTORE_DEFAULT_OFF + +# Sync time with Home Assistant. +time: + - platform: homeassistant + id: homeassistant_time + +sensor: + - platform: uptime + type: timestamp + name: Uptime + entity_category: diagnostic + # WiFi Signal sensor + - platform: wifi_signal + name: WiFi Signal + id: wifi_signal_db + icon: mdi:wifi-strength-outline + entity_category: diagnostic + update_interval: 30s + disabled_by_default: True + - platform: copy + source_id: wifi_signal_db + name: "WiFi Signal Percent" + id: wifi_signal_percent + icon: mdi:wifi-strength-outline + unit_of_measurement: "%" + filters: + - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); + entity_category: "diagnostic" + device_class: "" + disabled_by_default: True + - platform: internal_temperature + entity_category: diagnostic + name: "Internal Temperature" + +output: + - platform: ledc + pin: $blpin + id: lcd_backlight + frequency: 1000 Hz + +number: + - platform: template + name: "Display Brightness" + id: display_brightness + optimistic: true + min_value: 0 + max_value: 100 + step: 1 + initial_value: 100 + restore_value: true + mode: slider + on_value: + then: + - output.set_level: + id: lcd_backlight + level: !lambda "return x / 100.0;" + +# https://esphome.io/components/display/ +# TFT Display (ST7789) +display: + - platform: st7789v + cs_pin: $cspin + dc_pin: + number: $dcpin + ignore_strapping_warning: true + reset_pin: $rstpin + model: Waveshare 1.47in 172X320 + id: tft_ha + rotation: 0 + lambda: |- + # __LAMBDA_PLACEHOLDER__ From 87bbb6a6ae29f77f7177488d3d149bc94473afc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl-Petter=20=C3=85kesson?= Date: Sat, 24 Jan 2026 21:58:20 +0100 Subject: [PATCH 02/10] Remove duplicate sensor and time --- .../hardware/waveshare-esp32-c6-lcd-1.47.yaml | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml index 0be11c09..744bc9e5 100644 --- a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml +++ b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml @@ -193,39 +193,6 @@ light: # gamma_correct: 2.8 default_transition_length: 2s restore_mode: RESTORE_DEFAULT_OFF - -# Sync time with Home Assistant. -time: - - platform: homeassistant - id: homeassistant_time - -sensor: - - platform: uptime - type: timestamp - name: Uptime - entity_category: diagnostic - # WiFi Signal sensor - - platform: wifi_signal - name: WiFi Signal - id: wifi_signal_db - icon: mdi:wifi-strength-outline - entity_category: diagnostic - update_interval: 30s - disabled_by_default: True - - platform: copy - source_id: wifi_signal_db - name: "WiFi Signal Percent" - id: wifi_signal_percent - icon: mdi:wifi-strength-outline - unit_of_measurement: "%" - filters: - - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); - entity_category: "diagnostic" - device_class: "" - disabled_by_default: True - - platform: internal_temperature - entity_category: diagnostic - name: "Internal Temperature" output: - platform: ledc From 161ceb2dd3978e7987808ef7a79295cafece9514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl-Petter=20=C3=85kesson?= Date: Sat, 24 Jan 2026 21:59:17 +0100 Subject: [PATCH 03/10] Remove duplicate esphome --- .../frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml index 744bc9e5..72e30e66 100644 --- a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml +++ b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml @@ -58,14 +58,6 @@ substitutions: one_wire: GPIO10 logger: "DEBUG" -esphome: - min_version: 2025.12.0 - name: "${name}" - friendly_name: "${friendly_name}" - project: - name: "${project_name}" - version: "${project_version}" - esp32: board: esp32-c6-devkitc-1 variant: esp32c6 From a31dfb96f681ee1125818b64eaf17a01845450cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl-Petter=20=C3=85kesson?= Date: Sat, 24 Jan 2026 21:59:41 +0100 Subject: [PATCH 04/10] Correct device description --- .../frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml index 72e30e66..40dbbd37 100644 --- a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml +++ b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml @@ -3,10 +3,10 @@ # ============================================================================ # TARGET DEVICE: Waveshare ESP32-C6 LCD 1.47" 172x320 # - https://www.waveshare.com/esp32-c6-lcd-1.47.htm -# - Display Platform: ili9xxx -# - PSRAM: Yes (Octal, 80MHz) -# - Touchscreen: CST816S (I2C) -# - Framework: ESP-IDF with execute_from_psram +# - Display Platform: st7789v +# - PSRAM: No +# - Touchscreen: None +# - Framework: ESP-IDF # Name: Waveshare ESP32-C6 LCD 1.47" # Resolution: 172x320 # Shape: rectangle From 4058cfe9de77fb8fe9396ef31b615cdb5563f45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl-Petter=20=C3=85kesson?= Date: Sat, 24 Jan 2026 22:00:02 +0100 Subject: [PATCH 05/10] Rename display correct --- .../frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml index 40dbbd37..7300b803 100644 --- a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml +++ b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml @@ -219,7 +219,7 @@ display: ignore_strapping_warning: true reset_pin: $rstpin model: Waveshare 1.47in 172X320 - id: tft_ha + id: my_display rotation: 0 lambda: |- # __LAMBDA_PLACEHOLDER__ From 4b8c0f4304320c0c7505655927a793d276ed8a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl-Petter=20=C3=85kesson?= Date: Sun, 25 Jan 2026 17:56:50 +0100 Subject: [PATCH 06/10] Added some missing meta values --- .../frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml index 7300b803..bf35e02e 100644 --- a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml +++ b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml @@ -10,6 +10,9 @@ # Name: Waveshare ESP32-C6 LCD 1.47" # Resolution: 172x320 # Shape: rectangle +# Inverted: false +# Orrientation: portrait +# Dark Mode: disabled # ============================================================================ # # ============================================================================ From 03243bc74ba4ec0f7535afc138799b9958f40e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl-Petter=20=C3=85kesson?= Date: Wed, 4 Feb 2026 21:27:37 +0100 Subject: [PATCH 07/10] Apply new hw profile documentation format --- .../frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml index bf35e02e..aada4205 100644 --- a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml +++ b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml @@ -2,7 +2,6 @@ # ESPHome YAML - Generated by ESPHome Designer # ============================================================================ # TARGET DEVICE: Waveshare ESP32-C6 LCD 1.47" 172x320 -# - https://www.waveshare.com/esp32-c6-lcd-1.47.htm # - Display Platform: st7789v # - PSRAM: No # - Touchscreen: None @@ -15,6 +14,9 @@ # Dark Mode: disabled # ============================================================================ # +# BASED ON: https://www.waveshare.com/esp32-c6-lcd-1.47.htm +# Hardware configuration adapted for ESPHome Designer. +# # ============================================================================ # # SETUP INSTRUCTIONS: @@ -30,8 +32,10 @@ # - Select: ESP32-C6 # - Framework: ESP-IDF (Required for this device) # -# STEP 3: REPLACE your entire YAML with this generated output -# (This profile includes full esphome: and esp32: sections) +# STEP 3: PASTE this snippet into your device YAML +# - Paste this snippet at the end of your configuration. +# - System sections (esphome, esp32, psram, etc.) are auto-commented +# to avoid conflicts with your existing setup. # # ============================================================================ From e4d5e2b40eae4a48c39ef8f783337e33b0e16cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl-Petter=20=C3=85kesson?= Date: Wed, 4 Feb 2026 21:28:54 +0100 Subject: [PATCH 08/10] Remove api, ota, wifi, logger and captive_portal blocks --- .../hardware/waveshare-esp32-c6-lcd-1.47.yaml | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml index aada4205..8f081e27 100644 --- a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml +++ b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml @@ -96,30 +96,6 @@ esphome: - "-Wl,-Map,output.map" board_build.arduino.memory_type: qio_opi -# Enable Home Assistant API -api: - encryption: - key: !secret encryption_key - -ota: - - platform: esphome - id: my_ota - password: !secret ota_password - -wifi: - ssid: !secret wifi_ssid - password: !secret wifi_password - -# Enable fallback hotspot (captive portal) in case wifi connection fails - ap: - ssid: "${name}" - password: !secret wifi_fallback_password - -logger: - level: $logger - -captive_portal: - spi: mosi_pin: $mosipin miso_pin: $misopin From 1a41d1afc55a3bd85d5b93d79051a31fe92792d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl-Petter=20=C3=85kesson?= Date: Wed, 4 Feb 2026 21:29:16 +0100 Subject: [PATCH 09/10] Remove . from project name --- .../frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml index 8f081e27..54c70089 100644 --- a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml +++ b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml @@ -44,7 +44,7 @@ substitutions: id: esp32_c6_lcd_147 friendly_name: "Waveshare ESP32-C6-LCD-1.47\"" device_description: "Waveshare ESP32-C6 LCD 1.47 inch" - project_name: "ESPHomeDesigner_Waveshare_LCD_1.47" + project_name: "karl-petter.ESPHomeDesigner_Waveshare_LCD_1_47" project_version: "1.0.0" #GPIO pins for the LCD screen and SD Card rstpin: GPIO21 From ee684e2ac5d590e1c0a010ad147bee9ddbb1b0de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl-Petter=20=C3=85kesson?= Date: Wed, 4 Feb 2026 21:29:51 +0100 Subject: [PATCH 10/10] Remove not needed lambda: |- --- .../frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml index 54c70089..e1e84a08 100644 --- a/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml +++ b/custom_components/reterminal_dashboard/frontend/hardware/waveshare-esp32-c6-lcd-1.47.yaml @@ -204,5 +204,4 @@ display: model: Waveshare 1.47in 172X320 id: my_display rotation: 0 - lambda: |- # __LAMBDA_PLACEHOLDER__