ESPHomeHome Assistant

Cheap Yellow Display room climate panel with a plug-in sensor

An ESP32-2432S028R reads an AHT20 on the CN1 header, shows temperature and humidity on the panel, publishes both to Home Assistant, and toggles up to four entities from touch tiles.

Difficulty · IntermediateSetup · 45–90 minutesHA · 2024.10 or newerESPHome · 2026.10
Get the pack · from $19Have us set it up

Some hardware links on this page are affiliate links. As an Amazon Associate I earn from qualifying purchases. We may earn a commission if you buy through them, at no extra cost to you. See the affiliate disclosure.

The Cheap Yellow Display already has a touchscreen and almost no free pins. The useful ones for a sensor are on the CN1 header: power, ground, and two GPIOs. This firmware reads an AHT20 there, draws the temperature and humidity large, and publishes both to Home Assistant. Four tiles toggle entities you name. The backlight dims after the screen has been idle, and a touch brings it back.

A grid of scenes on the same board, without a local sensor, is CYD touch control panel. A thermostat face that follows a climate entity, instead of measuring the room itself, is CYD touch thermostat. A power number on the same panel is CYD power usage alarm.

What problem it solves

You want the room’s temperature and humidity on the desk, from a sensor plugged into the display, and a few touch targets that do not need a phone.

How it works

  1. The sensor. I2C is GPIO27 (SDA) and GPIO22 (SCL), on CN1, at 100 kHz. The AHT20 is address 0x38. Temperature and humidity are published as normal ESPHome sensors, so Home Assistant discovers them with the device. A BME280 block is in the file as comments. Delete the AHT20 block and uncomment it if that is the module you wired. Address 0x76 is the usual one.
  2. Offset. A template number, restored after reboot, is added to the temperature. The raw sample is kept so changing the offset updates the reading without waiting for the next poll. Humidity is not offset. Correct humidity in Home Assistant with a template if you need to.
  3. The screen. Landscape LVGL. Temperature is the large line, humidity under it. The backlight PWM is GPIO21, the same pin the other CYD packs use. After the idle time (default 60 seconds) the backlight turns off and LVGL pauses. A touch resumes it.
  4. Tiles. Four buttons. Each substitution is an entity id and a short label. A tap calls homeassistant.toggle on that entity. The label under the name follows the entity state (on, off, or the raw state). ESPHome will not call Home Assistant actions until you allow that on the device.
  5. What this file does not use. The speaker header and the RGB LED stay unused, so those pins are free. GPIO21 stays the backlight.

Hardware notes

  • CN1. GND, GPIO22, GPIO27, 3V3. That is the header with 3.3 V on it, beside the SD slot. SDA is GPIO27. SCL is GPIO22. The AHT20 VIN goes to 3V3, not to 5 V.
  • P3. GND, GPIO35, GPIO22, GPIO21. GPIO35 is input only, so it cannot be a clock or a data line. GPIO21 is the backlight. GPIO22 is the same net as CN1’s clock pin.
  • Board. ESP32-2432S028R, the common one-USB resistive panel (ILI9341, XPT2046). A two-USB ST7789 board needs a different display model. This YAML does not include that variant.
  • Power. 5 V USB. A flickering backlight is usually a weak supply. Flash over USB the first time.

Snippet

Names, the I2C pins, and the four entities are substitutions.

substitutions:
  device_name: room-climate-panel
  friendly_name: Room climate
  sda_pin: GPIO27
  scl_pin: GPIO22
  tile_1: switch.change_me_1
  tile_1_name: "One"

i2c:
  sda: ${sda_pin}
  scl: ${scl_pin}

The tile action is homeassistant.toggle with entity_id: ${tile_1}. Change the four entity ids before you flash.

Setup outline

  1. Copy esphome/cyd-i2c-climate.yaml into the ESPHome config. Copy esphome/secrets.example.yaml to secrets.yaml beside it, or add those keys to the secrets file you already have, and fill in your own values.
  2. Wire the AHT20 to CN1: SDA GPIO27, SCL GPIO22, VIN 3V3, GND. Edit the four tile substitutions. Leave the BME280 block commented unless you are using that module instead.
  3. Install over USB. Later updates can go over Wi-Fi.
  4. In Home Assistant, open the ESPHome device and allow it to perform Home Assistant actions. Until you do, the numbers still publish and the tiles do nothing.
  5. Confirm the temperature and humidity entities. Set Temperature offset if the module reads high or low. The value is restored after a reboot.
  6. Leave the panel alone for a minute. The backlight should go dark. Touch the glass. It should wake, and a tile should toggle its entity.

Troubleshooting

  • Both readings stay unknown. SDA and SCL are swapped, the module is on 5 V, or the wires are on P3’s GPIO35. The log line from scan: true lists the addresses it found. 0x38 is the AHT20. Nothing on the bus means the wires, not the screen.
  • The screen is white or mirrored. This file is the one-USB ILI9341 map used by the other CYD packs. A different panel needs model, color_order, or invert_colors changed. Touch that is rotated relative to the picture is the calibration block and the two mirror substitutions.
  • Tiles do nothing. Home Assistant actions are still blocked on the device, or the entity id substitution does not match a real entity. The state label staying -- is the same mismatch.
  • Offset snaps back to 0. The number entity was not the restored one (a second device, or the entity was deleted). It is restore_value: true with an initial value of 0, so the first boot is 0 until you set it.
  • Backlight never dims. Something is touching the panel, or idle_seconds was set very high. A paused screen still publishes the sensors. They do not depend on the backlight.
  • Humidity looks wrong and the offset does not move it. The offset number is temperature only. Humidity is the raw AHT20 value.

Credits

Wiring a sensor to this panel is a common note on the ESP32-2432S028. One public firmware that does it is BOlaerts/ESP32-2432s028, which is MIT. This pack does not copy that firmware. The display, touch, and LVGL setup is the same stock one-USB map as the other CYD packs here, with an original sensor and tile layout.

Changelog

v1.0 · Nov 2, 2026: First publish.