Skip to content

inytar/waveshare-esp32-s3-touch-lcd-7-esphome

Repository files navigation

The Package

This is an ESPHome package for the waveshare-esp32-s3-touch-lcd-7 display. The main idea is that all the boilerplate code is already done in the package and you can focus on the logic that makes your project special.

The package will:

  • setup the correct esp32 and esphome settings
  • setup the display and touchscreen
  • add an empty lvgl component
  • add a light.lcdbacklight and a switch.antiburn
  • automatically run the antiburn protection when the backlight is off
  • exposes the LCD Backlight light and Antiburn switch as disabled switches to Home Assistant

You can then add your own sensors and lvgl setup.

The package requires ESPHome version 2025.4.2 or greater, because I've not tested it with any older versions.

Usage

Controlling the display brightness

If you want to control the brightness of the display you'll need to do some soldering. There's a testpoint thatneeds to be soldered to a ESP32 pin. See this thread for how to do that.

My attempt Here's my attempt (make sure the red wire is isolated, to prevent a shortciruit! I've taped it off with electric tape.)

Once you've done that you can use the waveshare-esp32-s3-touch-lcd-7-brightness.yaml file instead, and you'll be able to to adapt the brightness of you display. See the clock-brightness.yaml demo for an example.

The brightness file has three variables you can set:

  • backlight_brightness_pin: defaults to GPIO16, which is the one I've used in the image above. If you have soldered the testpoint to another pin you'll need to give the correct one here.
  • initial_brightness: Set the brightness of the display on boot (float between 0.0 and 1.0, defaults to 0.8).
  • min_power: I've noticed that my display will be dark for a large part of the brightness range, to fix this I set this variable (float between 0.0 and 1.0, defaults to 0.07).

If you set these variables make sure to quote the floats, else things might break.

Using the brightness file adds a new light.lcdbacklight_brightness now you can use this to change the backlight brightness and turn on/off the backlight. You don't need to care about light.lcdbacklight anymore and can keep it on all the time.

The exposed LCD Backlight in Home Assistant will now also allow you to change the brightness of the display.

Thank you

I'd like to thank everyone in the main thread on the display and in the thread on brightness adjustment, who did the main work of figuring everything out around this display.

I'd especially like to thank:

  • runevad from whom I got most of the display code
  • plplaaa2 who seems to have first found out how to get brightness adjustment working
  • pkscout for his detailed posts on how to setup the brightness adjustment both in the hardware and software

About

ESPHome package to use with waveshare-esp32-s3-touch-lcd-7

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published