Help needed to get this tiny screen working - ESP32-c6 1.47in display

Just to add to this thread my success. This was sitting in a box for a while and I finally this morning tried to get it running. This thread was invaluable, realise being a slight late adopter has its advantages.

I started by creating a device in ESPHome Builder and using a generic ‘esp32-c6-devkitc-1’ as that is now supported natively. After successfully connecting wirelessly, I then added the code from @PsY4 above, the following sections:

esphome:
platformio_options:
→ section entirely

esp32:
→ section entirely

output section for the lcd_backlight control

number:
→ section entirely (realising I can just hard code this)
display:
→ section entirely

Note: in order for the device to work after re-booting or re-applying power it has to be added into home assistant in the devices menu.

Working really well, many thanks all.

2 Likes

There’s been a lot of changes in HA around this area.
I posted code that worked really well from about March until May, and then with June it updated and broke the LCD screen output…
Will repost to confirm when found a working version.

What image did you use for the background.png?

As of esphome 2025.9.1, the following code is what you need to get the screen running.

Curiously it doesn’t go well together with threads so I guess we are stuck with Wi-Fi for now.

esp32:
  board: esp32-c6-devkitc-1
  variant: esp32c6
  framework:
    type: esp-idf
spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6
  miso_pin: GPIO5
display:
  - platform: st7789v
    model: Waveshare 1.47in 172X320
    dc_pin:
      number: GPIO15
      ignore_strapping_warning: true
    cs_pin: GPIO14
    reset_pin: GPIO21
    backlight_pin: GPIO22
    platform_version: 6.9.0

I am afraid that version is not available anymore.
And the latest is far away from a 6.* :
https://github.com/pioarduino/platform-espressif32/releases/download/54.03.21-2/platform-espressif32.zip)

I can compile and upload my config, but nothing shows up on the screen. Just many “Display update running” in the logs, and a “[W][api.connection:1880]: Home Assistant 2025.4.0 (192.168.1.15): Reading failed CONNECTION_CLOSED errno=128” every 30 seconds.

I think I will put it to a drawer for a couple of months.

1 Like

Does anyone know what this fla means?

“-DBOARD_HAS_PSRAM”

Actually the board doesn’t have PSRAM, right?

Post your yaml and compile log (formatted please).

I thought about borrowing this yaml:

Not done anything with it yet.

I got it working from here ST7789V TFT LCD - ESPHome - Smart Home Made Simple

This is my file that reads the time and displays locally. I couldn’t get the remote
Still very raw with lots of comments

#esp32c6-lcd-147a  Waveshare C6 LCD 1.47in
#
# 260101 : working on display except for time.
# 251231 : config
# https://esphome.io/components/display/st7789v/ see Waveshare 1.47in 172X320
# LCD driver ST7789V3 (LBS147TC-IF15) 172(H)RGB x320(V)
#

substitutions:
  logger_dbg: "DEBUG"


esphome:
  name: esp32c6-lcd-147a
  friendly_name: ESP32C6-LCD-1.47A

esp32:
  board: esp32-c6-devkitc-1
  variant: esp32c6
  framework:
    type: esp-idf

spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6
  miso_pin: GPIO5



# Enable logging
logger:
  level: $logger_dbg
  logs:
    component: ERROR

# Enable Home Assistant API
api:
  reboot_timeout: 0s
  encryption:
    key: "c3lJs2O148U6z6VivWPGDzpHcLsrN3k36Gq5VMz+Lno="

ota:
  - platform: esphome
    password: "b709958b1b0c68620096a78dc60b5cd1"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32C6-Lcd-147A"
    password: "Y1OQtMqYFbu5"

captive_portal:
    
color:
  - id: my_red
    red: 100%
    green: 0%
    blue: 0%
  - id: my_yellow
    red: 100%
    green: 100%
    blue: 0%
  - id: my_green
    red: 0%
    green: 100%
    blue: 0%
  - id: my_blue
    red: 0%
    green: 0%
    blue: 100%
  - id: my_gray
    red: 50%
    green: 50%
    blue: 50%

font:
  - file: "fonts/Helvetica.ttf"
    id: helvetica_48
    size: 48
  - file: "fonts/Helvetica.ttf"
    id: helvetica_24
    size: 24
  - file: "fonts/Helvetica.ttf"
    id: helvetica_12
    size: 12

binary_sensor:
  - platform: status
    name: "Node Status"
    id: system_status
  - platform: gpio
    pin:
      number: GPIO09 
      inverted: true
      mode:
        input: true
        pullup: true
    name: "T-Display Button Input 0"
    id: tdisplay_button_input_0

# Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: esptime

text_sensor:  #shows on web page
#https://esphome.io/components/text_sensor/uptime.html
  - platform: uptime
    name: "Uptime ddhhmmss"
    #friendly_name: "Uptime ddhhmmss"

################################################################################
# Sensors
################################################################################
sensor:
  # https://esphome.io/components/sensor/uptime.html
  - platform: uptime
    name: UptimeSecs
    id: uptime_secs
    type: seconds
  #  update_interval: 60s
    entity_category: diagnostic

display:
  - platform: st7789v
    model: Waveshare 1.47in 172X320
    dc_pin:
      number: GPIO15
      ignore_strapping_warning: true
    cs_pin: GPIO14
    reset_pin: GPIO21
    backlight_pin: GPIO22
    rotation: 90
    lambda: |-
      it.rectangle(0,  0, it.get_width(), it.get_height(), id(my_blue));
      it.rectangle(0, 20, it.get_width(), it.get_height(), id(my_blue));   // header bar

      it.strftime((240 / 2), (140 / 3) * 1 + 5, id(helvetica_24), id(my_gray), TextAlign::CENTER, "%Y-%m-%d", id(esptime).now());
      it.strftime((240 / 2), (140 / 3) * 2 + 5, id(helvetica_48), id(my_gray), TextAlign::CENTER, "%H:%M:%S", id(esptime).now());
      it.print(5, 5, id(helvetica_12), id(my_yellow), TextAlign::TOP_LEFT, "ESPHome");

      // Comment out the above lines to see the image without text overlaid
      // it.image(0, 0, id(my_image));

      if (id(system_status).state) {
        it.print(235, 5, id(helvetica_12), id(my_green), TextAlign::TOP_RIGHT, "Online");
      }
      else {
        it.print(235, 5, id(helvetica_12), id(my_red), TextAlign::TOP_RIGHT, "Offline");
      }
1 Like

After a week of trying different configs I finally landed on some mentioning that display driver st7789v is obsolete and need to use mipi_spi. After going through waveshare C++ samples was able to generate proper display config

this is just snippet of my config, but display and WiFi work together and I can control brightness of the display

esphome:
  name: ${device_internal_name}
  friendly_name: ${device_friendly_name}
  on_boot:
    then:
      - light.turn_on:
          id: back_light
          brightness: 50%

################################################################################
# ESP32 platform
################################################################################
esp32:
  board: esp32-c6-devkitc-1
  variant: esp32c6
  flash_size: 4MB
  framework:
    type: esp-idf


################################################################################
# SPI
################################################################################
spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6
  miso_pin: GPIO5

################################################################################
# DISPLAY
################################################################################
# Define a PWM output on the ESP32
output:
  - platform: ledc
    pin: GPIO22
    id: backlight_pwm

# Define a monochromatic, dimmable light for the backlight
light:
  - platform: monochromatic
    output: backlight_pwm
    name: "Display Backlight"
    id: back_light
    restore_mode: ALWAYS_ON

display:
  - platform: mipi_spi
    model: custom
    dc_pin: GPIO15
    cs_pin: GPIO14
    reset_pin: GPIO21
    color_order: bgr
    color_depth : 16
    pixel_mode: 18bit
    invert_colors: true
    transform:
      swap_xy: true
      mirror_x: false
      mirror_y: false
    dimensions:
      width: 320
      height: 172
      offset_height: 34
      offset_width: 0
    init_sequence:
      # LCD_Driver\Vernon_ST7789T\Vernon_ST7789T.c
      - [ 0xb0, 0x00, 0xe8]
      - [ 0xB2,0x0c, 0x0c, 0x00, 0x33, 0x33 ]
      - [ 0xb7, 0x75 ]
      - [ 0xbb, 0x1a ]
      - [ 0xc0, 0x80 ]
      - [ 0xc2, 0x01, 0xff ]
      - [ 0xc3, 0x13 ]
      - [ 0xb4, 0x20 ]
      - [ 0xc6, 0x0f ]
      - [ 0xd0, 0xa4, 0xa1 ]
      - [ 0xE0, 0xD0, 0x0D, 0x14, 0x0D, 0x0D, 0x09, 0x38, 0x44, 0x4E, 0x3A, 0x17, 0x18, 0x2F, 0x30 ]
      - [ 0xE1, 0xD0, 0x09, 0x0F, 0x08, 0x07, 0x14, 0x37, 0x44, 0x4D, 0x38, 0x15, 0x16, 0x2C, 0x2E ]
      - [ 0x21 ]
      - [ 0x29 ]
      - [ 0x2c ]


I have used the code and it creates the stripes across the display. With st7789v platform they were not there.

I would try changing " data_rate" from here

Also the board I used it is this one Amazon.com: Waveshare ESP32-C6 1.47inch Display Development Board, 172×320, 262K Color, 160MHz Running Frequency Single-Core Processor, Supports Wi-Fi 6 & BLE, with Colorful RGB LED, ESP32 with Display : Electronics, so there can be some model differences that need finetuning

I used original 40MHz, default 10MHz and 1MHz. It has no influence on the picture. Mine device is from Aliexpress, but it looks the same.
Odd thing is that with old library it works flawlessly - except the slow refresh, but that is the same with mipi_spi.
It looks that the drawing is split to several sectors and it can be artifact from that.

[14:11:06.349][V][display.mipi_spi:510]: Drawing from line 0 took 9ms
[14:11:06.351][V][display.mipi_spi:515]: x_low 0, y_low 0, x_high 319, y_high 20
[14:11:06.353][V][display.mipi_spi:297]: Set addr 0/0, 319/21
[14:11:06.354][V][display.mipi_spi:244]: Command 2B, length 4, bytes 00.22.00.37
[14:11:06.356][V][display.mipi_spi:244]: Command 2A, length 4, bytes 00.00.01.3F
[14:11:06.359][V][display.mipi_spi:244]: Command 2C, length 0, bytes
[14:11:06.369][V][display.mipi_spi:532]: Write to display took 17ms
[14:11:06.370][D][display:428]: Display update running
[14:11:06.377][V][display.mipi_spi:510]: Drawing from line 21 took 7ms
[14:11:06.378][V][display.mipi_spi:515]: x_low 0, y_low 21, x_high 319, y_high 41
[14:11:06.380][V][display.mipi_spi:297]: Set addr 0/20, 319/41
[14:11:06.381][V][display.mipi_spi:244]: Command 2B, length 4, bytes 00.36.00.4B
[14:11:06.384][V][display.mipi_spi:244]: Command 2A, length 4, bytes 00.00.01.3F
[14:11:06.386][V][display.mipi_spi:244]: Command 2C, length 0, bytes
[14:11:06.395][V][display.mipi_spi:532]: Write to display took 17ms
[14:11:06.397][D][display:428]: Display update running
[14:11:06.405][V][display.mipi_spi:510]: Drawing from line 42 took 8ms
[14:11:06.406][V][display.mipi_spi:515]: x_low 0, y_low 42, x_high 319, y_high 62
[14:11:06.408][V][display.mipi_spi:297]: Set addr 0/42, 319/63
[14:11:06.410][V][display.mipi_spi:244]: Command 2B, length 4, bytes 00.4C.00.61
[14:11:06.412][V][display.mipi_spi:244]: Command 2A, length 4, bytes 00.00.01.3F
[14:11:06.413][V][display.mipi_spi:244]: Command 2C, length 0, bytes
[14:11:06.424][V][display.mipi_spi:532]: Write to display took 17ms
[14:11:06.426][D][display:428]: Display update running
[14:11:06.434][V][display.mipi_spi:510]: Drawing from line 63 took 8ms
[14:11:06.435][V][display.mipi_spi:515]: x_low 0, y_low 63, x_high 319, y_high 83
[14:11:06.437][V][display.mipi_spi:297]: Set addr 0/62, 319/83
[14:11:06.440][V][display.mipi_spi:244]: Command 2B, length 4, bytes 00.60.00.75
[14:11:06.440][V][display.mipi_spi:244]: Command 2A, length 4, bytes 00.00.01.3F
[14:11:06.443][V][display.mipi_spi:244]: Command 2C, length 0, bytes
[14:11:06.452][V][display.mipi_spi:532]: Write to display took 17ms
[14:11:06.454][D][display:428]: Display update running
[14:11:06.471][V][display.mipi_spi:510]: Drawing from line 84 took 8ms
[14:11:06.471][V][display.mipi_spi:515]: x_low 0, y_low 84, x_high 319, y_high 104
[14:11:06.471][V][display.mipi_spi:297]: Set addr 0/84, 319/105
[14:11:06.471][V][display.mipi_spi:244]: Command 2B, length 4, bytes 00.76.00.8B
[14:11:06.471][V][display.mipi_spi:244]: Command 2A, length 4, bytes 00.00.01.3F
[14:11:06.471][V][display.mipi_spi:244]: Command 2C, length 0, bytes
[14:11:06.479][V][display.mipi_spi:532]: Write to display took 15ms
[14:11:06.480][D][display:428]: Display update running
[14:11:06.489][V][display.mipi_spi:510]: Drawing from line 105 took 9ms
[14:11:06.490][V][display.mipi_spi:515]: x_low 0, y_low 105, x_high 319, y_high 125
[14:11:06.492][V][display.mipi_spi:297]: Set addr 0/104, 319/125
[14:11:06.494][V][display.mipi_spi:244]: Command 2B, length 4, bytes 00.8A.00.9F
[14:11:06.496][V][display.mipi_spi:244]: Command 2A, length 4, bytes 00.00.01.3F
[14:11:06.498][V][display.mipi_spi:244]: Command 2C, length 0, bytes
[14:11:06.507][V][display.mipi_spi:532]: Write to display took 17ms
[14:11:06.509][D][display:428]: Display update running
[14:11:06.517][V][display.mipi_spi:510]: Drawing from line 126 took 8ms
[14:11:06.518][V][display.mipi_spi:515]: x_low 0, y_low 126, x_high 319, y_high 146
[14:11:06.520][V][display.mipi_spi:297]: Set addr 0/126, 319/147
[14:11:06.521][V][display.mipi_spi:244]: Command 2B, length 4, bytes 00.A0.00.B5
[14:11:06.524][V][display.mipi_spi:244]: Command 2A, length 4, bytes 00.00.01.3F
[14:11:06.526][V][display.mipi_spi:244]: Command 2C, length 0, bytes
[14:11:06.535][V][display.mipi_spi:532]: Write to display took 17ms
[14:11:06.537][D][display:428]: Display update running
[14:11:06.545][V][display.mipi_spi:510]: Drawing from line 147 took 8ms
[14:11:06.546][V][display.mipi_spi:515]: x_low 0, y_low 147, x_high 319, y_high 167
[14:11:06.549][V][display.mipi_spi:297]: Set addr 0/146, 319/167
[14:11:06.550][V][display.mipi_spi:244]: Command 2B, length 4, bytes 00.B4.00.C9
[14:11:06.552][V][display.mipi_spi:244]: Command 2A, length 4, bytes 00.00.01.3F
[14:11:06.554][V][display.mipi_spi:244]: Command 2C, length 0, bytes
[14:11:06.563][V][display.mipi_spi:532]: Write to display took 17ms
[14:11:06.573][D][display:428]: Display update running
[14:11:06.575][V][display.mipi_spi:510]: Drawing from line 168 took 9ms
[14:11:06.577][V][display.mipi_spi:515]: x_low 0, y_low 168, x_high 319, y_high 188
[14:11:06.578][V][display.mipi_spi:297]: Set addr 0/168, 319/189
[14:11:06.580][V][display.mipi_spi:244]: Command 2B, length 4, bytes 00.CA.00.DF
[14:11:06.582][V][display.mipi_spi:244]: Command 2A, length 4, bytes 00.00.01.3F
[14:11:06.584][V][display.mipi_spi:244]: Command 2C, length 0, bytes
[14:11:06.593][V][display.mipi_spi:532]: Write to display took 16ms
[14:11:06.595][V][display.mipi_spi:537]: Total update took 255ms

Thanks for all your fine examples.

regarding the stripes you might want to take a look at MIPI SPI Display Driver - ESPHome - Smart Home Made Simple

  • draw_rounding (Optional): The rounding factor for drawing operations. Defaults to 2. Some chips require a higher value to avoid display artifacts. Must be a power of 2.

draw_rounding: 1 solved the stripes for me :wink:

2 Likes

So close to getting this working. Both Claude.ai and myself are now brain tired :slight_smile:
Sadly I am not a great programmer. The program loads and display works. It just not changing graphic and LED based on entitity state. I confimed the entitity is fine. I just want a small display showing my utility TOU.
Here is my code

esphome:
  name: hydro-one-display
  friendly_name: Hydro One Display


esp32:
  board: esp32-c6-devkitc-1
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "8dyoghia08MZzxJKl3ur/UuZi3QNPQ2TA1Qcwaw+RUQ="

ota:
  - platform: esphome
    password: "1afd6392f5970c4dc85eb4a8b45640a8"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

web_server:
  port: 80
  # Optional: Customize the appearance or functionality
  version: 3 # Use version 3 for HA-Styling and sorting groups
  local: true # Include supporting JavaScript locally for offline access

######

# SPI bus
# ─────────────────────────────────────────
spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6

# ─────────────────────────────────────────
# Backlight output (ledc PWM)
# ─────────────────────────────────────────
output:
  - platform: ledc
    pin: GPIO22
    id: backlight_pwm

# ─────────────────────────────────────────
# All lights in ONE block
# ─────────────────────────────────────────
light:
  - platform: monochromatic
    output: backlight_pwm
    id: backlight
    name: "Display Backlight"
    restore_mode: ALWAYS_ON

  - platform: esp32_rmt_led_strip
    name: "Status LED"
    id: status_led
    pin: GPIO8
    num_leds: 1
    chipset: WS2812
    rgb_order: GRB
    restore_mode: ALWAYS_OFF

# ─────────────────────────────────────────
# Display
# ─────────────────────────────────────────
display:
  - platform: ili9xxx
    model: ST7789V
    id: my_display
    cs_pin: GPIO14
    dc_pin: GPIO15
    reset_pin: GPIO21
    invert_colors: true
    dimensions:
      width: 172
      height: 320
      offset_width: 34
      offset_height: 0
    rotation: 0
    data_rate: 40MHz
    auto_clear_enabled: false
    update_interval: never

# ─────────────────────────────────────────
# HA sensor import
# ─────────────────────────────────────────
text_sensor:
  - platform: homeassistant
    id: hydro_peak_state
    entity_id: sensor.hydro_one_active_peak
    on_value:
      then:
        - script.execute: update_display

# ─────────────────────────────────────────
# Poll every 30 seconds as a fallback
# catches the case where on_value never fires
# because state hasn't changed since boot
# ─────────────────────────────────────────
interval:
  - interval: 30s
    then:
      - script.execute: update_display

# ─────────────────────────────────────────
# Fonts
# ─────────────────────────────────────────
font:
  - file: "gfonts://Montserrat"
    id: font_large
    size: 24

  - file: "gfonts://Montserrat"
    id: font_medium
    size: 20

  - file: "gfonts://Montserrat"
    id: font_small
    size: 16

  - file: "https://cdn.jsdelivr.net/npm/@mdi/[email protected]/fonts/materialdesignicons-webfont.ttf"
    id: font_icon
    size: 48
    glyphs:
      - "\U000F0126"   # mdi:chart-bell-curve
      - "\U000F0215"   # mdi:lightning-bolt
      - "\U000F02D6"   # mdi:help-circle
      - "\U000F1A06"   # mdi:lightning-bolt-outline

# ─────────────────────────────────────────
# LVGL UI — starts blank/grey so we can
# clearly see when HA state is applied
# ─────────────────────────────────────────
lvgl:
  displays: my_display
  color_depth: 16
  bg_color: 0x1C1C1E

  style_definitions:
    - id: card_style
      bg_color: 0x2C2C2E
      bg_opa: COVER
      radius: 16
      pad_all: 12
      border_width: 0

  widgets:
    - obj:
        id: card_bg
        x: 6
        y: 6
        width: 160
        height: 308
        styles: card_style
        widgets:

          - obj:
              id: icon_circle
              align: TOP_MID
              y: 20
              width: 80
              height: 80
              radius: 40
              bg_color: 0x3A3A3C      # neutral grey until HA responds
              bg_opa: COVER
              border_width: 0
              widgets:
                - label:
                    id: peak_icon
                    align: CENTER
                    text_font: font_icon
                    text: "\U000F02D6"   # help-circle until HA responds
                    text_color: 0x8E8E93

          - obj:
              id: badge_dot
              align: TOP_MID
              x: 32
              y: 88
              width: 18
              height: 18
              radius: 9
              bg_color: 0x8E8E93      # grey until HA responds
              bg_opa: COVER
              border_width: 2
              border_color: 0x2C2C2E

          - label:
              id: lbl_primary
              align: TOP_MID
              y: 116
              text: "Hydro One"
              text_color: 0xFFFFFF
              text_font: font_large

          - label:
              id: lbl_secondary
              align: TOP_MID
              y: 150
              text: "Connecting..."   # shows until HA state arrives
              text_color: 0x8E8E93
              text_font: font_medium

          - obj:
              align: TOP_MID
              y: 184
              width: 130
              height: 2
              bg_color: 0x48484A
              bg_opa: COVER
              border_width: 0

          - label:
              id: lbl_rate
              align: TOP_MID
              y: 198
              text: ""
              text_color: 0xAEAEB2
              text_font: font_small

# ─────────────────────────────────────────
# Script — update LVGL + LED
# ─────────────────────────────────────────
script:
  - id: update_display
    then:
      - if:
          condition:
            lambda: 'return id(hydro_peak_state).state == "on_peak";'
          then:
            - lvgl.label.update:
                id: lbl_secondary
                text: "On Peak"
                text_color: 0xFF453A
            - lvgl.label.update:
                id: peak_icon
                text: "\U000F0215"
                text_color: 0xFF453A
            - lvgl.obj.update:
                id: icon_circle
                bg_color: 0x3B1A1A
            - lvgl.obj.update:
                id: badge_dot
                bg_color: 0xFF453A
            - lvgl.label.update:
                id: lbl_rate
                text: "Highest Rate"
            - light.turn_on:
                id: status_led
                red: 100%
                green: 0%
                blue: 0%
                brightness: 70%
          else:
            - if:
                condition:
                  lambda: 'return id(hydro_peak_state).state == "mid_peak";'
                then:
                  - lvgl.label.update:
                      id: lbl_secondary
                      text: "Mid Peak"
                      text_color: 0xFF9F0A
                  - lvgl.label.update:
                      id: peak_icon
                      text: "\U000F0126"
                      text_color: 0xFF9F0A
                  - lvgl.obj.update:
                      id: icon_circle
                      bg_color: 0x3B2E0A
                  - lvgl.obj.update:
                      id: badge_dot
                      bg_color: 0xFF9F0A
                  - lvgl.label.update:
                      id: lbl_rate
                      text: "Mid Rate"
                  - light.turn_on:
                      id: status_led
                      red: 100%
                      green: 63%
                      blue: 0%
                      brightness: 70%
                else:
                  - if:
                      condition:
                        lambda: 'return id(hydro_peak_state).state == "off_peak";'
                      then:
                        - lvgl.label.update:
                            id: lbl_secondary
                            text: "Off Peak"
                            text_color: 0x30D158
                        - lvgl.label.update:
                            id: peak_icon
                            text: "\U000F1A06"
                            text_color: 0x30D158
                        - lvgl.obj.update:
                            id: icon_circle
                            bg_color: 0x0A2E1A
                        - lvgl.obj.update:
                            id: badge_dot
                            bg_color: 0x30D158
                        - lvgl.label.update:
                            id: lbl_rate
                            text: "Lowest Rate"
                        - light.turn_on:
                            id: status_led
                            red: 0%
                            green: 100%
                            blue: 0%
                            brightness: 70%
                      else:
                        - lvgl.label.update:
                            id: lbl_secondary
                            text: "Unknown"
                            text_color: 0x8E8E93
                        - lvgl.label.update:
                            id: peak_icon
                            text: "\U000F02D6"
                            text_color: 0x8E8E93
                        - lvgl.obj.update:
                            id: icon_circle
                            bg_color: 0x3A3A3C
                        - lvgl.obj.update:
                            id: badge_dot
                            bg_color: 0x8E8E93
                        - lvgl.label.update:
                            id: lbl_rate
                            text: ""
                        - light.turn_off:
                            id: status_led
captive_portal:

All I see is a ? Hydro One and Unknown.

This codes works on my dashboard

type: custom:mushroom-template-card
primary: Hydro One
secondary: |-
  {% if is_state("sensor.hydro_one_active_peak", "on_peak") %}
    On Peak
  {% elif is_state("sensor.hydro_one_active_peak", "mid_peak") %}
    Mid Peak
  {% elif is_state("sensor.hydro_one_active_peak", "off_peak") %}
    Off Peak
  {% else %}
    {{ states("sensor.hydro_one_active_peak") }}
  {% endif %}
icon: |-
  {% if is_state("sensor.hydro_one_active_peak", "on_peak") %}
    mdi:lightning-bolt
  {% elif is_state("sensor.hydro_one_active_peak", "mid_peak") %}
    mdi:chart-bell-curve
  {% elif is_state("sensor.hydro_one_active_peak", "off_peak") %}
    mdi:lightning-bolt-outline
  {% else %}
    mdi:help-circle
  {% endif %}
badge_icon: mdi:circle
badge_color: |-
  {% if is_state("sensor.hydro_one_active_peak", "on_peak") %}
    red
  {% elif is_state("sensor.hydro_one_active_peak", "mid_peak") %}
    amber
  {% elif is_state("sensor.hydro_one_active_peak", "off_peak") %}
    green
  {% else %}
    grey
  {% endif %}
color: |-
  {% if is_state("sensor.hydro_one_active_peak", "on_peak") %}
    red
  {% elif is_state("sensor.hydro_one_active_peak", "mid_peak") %}
    amber
  {% elif is_state("sensor.hydro_one_active_peak", "off_peak") %}
    green
  {% else %}
    grey
  {% endif %}
vertical: true
features_position: bottom
grid_options:
  columns: full
  rows: 2
icon_tap_action:
  action: more-info
entity: sensor.hydro_one_active_peak

Any help / direction greatly appreciated.

For anyone having trouble suign these units, there does seem to have been an update which broke stuff.
However, it now seems to be more stable and vanilla from esphome rather than pulling off github links (thanks to those who did that code of course!)

The display driver changed wildly to use mipi_spi only.
Works with some init data.

The adc driver does not need to use fractured_blue c6_adc plugin (which won’t compile any more too) and can just go straight from the main:

esp32:
board: esp32-c6-devkitc-1
variant: esp32c6
framework:
type: esp-idf

We must also use “attenuation: auto” on adc definitions or it will not give full range (about 3-3.1V) and only give 1V range on ADC inputs
This sets a static IP, it falls over to making a wifi AP if no connection.

I have developed a PCB that has a 5V to 24V step up converter that can power 4-20mA sensors, so one can have 6 sensors on a unit. It can also take digital inputs if there is a little resistance set up.

The circuit provides a 24V output which can be sent to the sensor to power it and then the signal that comes back has a voltage divider so that 0mA=0Vdc and 20mA =3.3Vdc onto the pin.
So one sensor is converting a 0-10bar air pressure sensor and one is just volts on the input (not calibrated for anything). But it can give 6off 4-20mA inputs.

esphome:
  name: esp32-lcd9
  friendly_name: Esp32-LCD9

esp32:
  board: esp32-c6-devkitc-1
  variant: esp32c6
  framework:
    type: esp-idf

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.1.79
    gateway: 192.168.1.1
    subnet: 255.255.255.0
    dns1: 192.168.1.1
  fast_connect: off
  reboot_timeout: 5min
  power_save_mode: HIGH
  on_connect:
    then:
      - logger.log: "WiFi connected"
  on_disconnect:
    then:
      - logger.log: "WiFi disconnected"
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-Lcd9 Fallback Hotspot"
    password: !secret ap_password

# Example configuration entry
button:
  - platform: restart
    name: "Restart Esp32C"

color:
  - id: my_red
    red: 100%
    green: 0%
    blue: 0%
  - id: my_yellow
    red: 100%
    green: 100%
    blue: 0%
  - id: my_green
    red: 0%
    green: 100%
    blue: 0%
  - id: my_blue
    red: 0%
    green: 0%
    blue: 100%
  - id: my_gray
    red: 50%
    green: 50%
    blue: 50%

font:
  - file: "arial.ttf"
    id: arial
    size: 16
  - file: "Helvetica.ttf"
    id: helvetica_24
    size: 24
  - file: "Helvetica.ttf"
    id: helvetica_18
    size: 18
  - file: "Helvetica.ttf"
    id: helvetica_12
    size: 12


#image:
#  - file: "image1.jpg"
#    id: my_image
#    resize: 200x200
#    type: RGB

time:
  - platform: homeassistant
    id: esptime

sensor:
    #sensors
  - platform: wifi_signal
    name: "Ext9-wifi"
    id: e9_wifi
    update_interval: 5s
    unit_of_measurement: "dBm"
    state_class: "measurement"
    #adc
  - platform: adc
    pin: GPIO0
    name: "Ext9-adc0"
    id: e9_adc0
    update_interval: 5s
    unit_of_measurement: "bar"
    device_class: pressure
    state_class: "measurement"
    filters:
      - multiply: 4.25
      - offset: -2.8
      #- multiply: 6.26
      #- offset: -4.174
    attenuation: auto
  - platform: adc
    pin: GPIO1
    name: "Ext9-adc1"
    id: e9_adc1
    update_interval: 5s
    unit_of_measurement: "V"
    device_class: voltage
    state_class: "measurement"
    filters:
      - multiply: 1
      - offset: 0
    attenuation: auto


spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6
#  miso_pin: GPIO5

display:
  - platform: mipi_spi
    model: custom
    dc_pin: GPIO15
    cs_pin: GPIO14
    reset_pin: GPIO21
    color_order: bgr
    color_depth : 16
    pixel_mode: 18bit
    invert_colors: true
    transform:
      swap_xy: true
      mirror_x: false
      mirror_y: false
    rotation: 180
    dimensions:
      width: 320
      height: 172
      offset_height: 34
      offset_width: 0
    init_sequence:
      # LCD_Driver\Vernon_ST7789T\Vernon_ST7789T.c
      - [ 0xb0, 0x00, 0xe8]
      - [ 0xB2,0x0c, 0x0c, 0x00, 0x33, 0x33 ]
      - [ 0xb7, 0x75 ]
      - [ 0xbb, 0x1a ]
      - [ 0xc0, 0x80 ]
      - [ 0xc2, 0x01, 0xff ]
      - [ 0xc3, 0x13 ]
      - [ 0xb4, 0x20 ]
      - [ 0xc6, 0x0f ]
      - [ 0xd0, 0xa4, 0xa1 ]
      - [ 0xE0, 0xD0, 0x0D, 0x14, 0x0D, 0x0D, 0x09, 0x38, 0x44, 0x4E, 0x3A, 0x17, 0x18, 0x2F, 0x30 ]
      - [ 0xE1, 0xD0, 0x09, 0x0F, 0x08, 0x07, 0x14, 0x37, 0x44, 0x4D, 0x38, 0x15, 0x16, 0x2C, 0x2E ]
      - [ 0x21 ]
      - [ 0x29 ]
      - [ 0x2c ]
    lambda: |-
      it.rectangle(0,  0, it.get_width(), it.get_height(), id(my_blue));
      it.rectangle(0, 22, it.get_width(), it.get_height(), id(my_blue));
      it.strftime(15, 4, id(helvetica_18), id(my_yellow), TextAlign::LEFT, "%Y-%m-%d", id(esptime).now());
      it.strftime(112, 4, id(helvetica_18), id(my_yellow), TextAlign::LEFT, "%H:%M:%S", id(esptime).now());
      it.printf(220, 4, id(helvetica_18),  id(my_green), "Wifi:%.0fdB", id(e9_wifi).state);
      it.print(10, 34, id(helvetica_24),  id(my_red), "E9-ADC:");
      it.printf(10, 60, id(helvetica_24), id(my_yellow), "A0:%.2fbar   A1:%.2fV", id(e9_adc0).state, id(e9_adc1).state);

output:
  - platform: ledc
    pin: GPIO22
    id: lcd_backlight
    frequency: 200 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;"
    
# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: !secret api_encryption_key

ota:
  - platform: esphome
    password: !secret ota_password

captive_portal: