T-Relay S3 ESPHome Smart Switch Controller - image 1
Integrationbeginner

T-Relay S3 ESPHome Smart Switch Controller

ESPHome configuration template for the LILYGO T-Relay S3 that exposes all 6 onboard relays, LED status indicators, and real-time clock directly to Home Assistant with zero manual GPIO wiring.

Boards:ESP32-S3
Firmware:ESPHomeHome Assistant
Use Cases:Home AutomationIndustrial Automation

Overview

This project provides a complete ESPHome starting template for the LILYGO T-Relay S3, enabling immediate Home Assistant integration without writing any firmware from scratch. All onboard hardware components — relays, status LEDs, and RTC — are pre-mapped to the correct GPIO pins using the SN74HC595 shift-register interface.

Features

Six independently controllable relays are exposed as switch entities in Home Assistant. Two status LEDs provide at-a-glance feedback: a red LED indicates ESPHome connection status and a green LED confirms network connectivity. An onboard PCF8563 real-time clock keeps accurate time even without internet connectivity.

The ESP32-S3-WROOM-1U-N16R8 module provides 16 MB of flash and 8 MB of PSRAM, giving plenty of headroom for complex automations and OTA updates. The board also exposes Cascading (CC), Expansion (EC), and Display (DC) connectors, allowing up to three expansion boards to be chained for a total of 24 relays in a single Home Assistant device.

Optional DS18B20 temperature sensor support is included in the configuration for monitoring the electrical cabinet or load temperature alongside relay control.

Getting Started

Copy template.yaml into your ESPHome configuration directory, fill in your WiFi credentials and device name substitutions, then compile and flash via the ESPHome dashboard. The board will appear in Home Assistant immediately after adoption.

Resources