The most basic remote control needs push buttons to toggle devices, and an indicator LED to display the device status.
In addition, you need a microcontroller that is compatible with ESPHome, i.e. a ESP32-S2 Mini.
Overview
In its most simple form, a remote control requires one push button plus one standard indicator LED per controllable device. For example, with four push buttons and four LEDs, you get a 4-channel remote control.
Push Buttons
Each push button will be implemented as binary_sensor:
and requires one GPIO.
LEDs
To provide visual feedback and indicate the current device status for the device that the push button controls, add at least one LED per push button. LEDs will be implemented as output:
.
Here are your options:
- One LED:
The LED is on when the device is on, and off otherwise. - Two LEDs: One LED is on when the device is on (i.e. green), and another LED is on (i.e. red) when the device is off
- Bi-Polar LED: By using a bi-polar LED, a single LED can visualize both states: it lights green when the device is on, and red when it is off
Regardless of how you wish to implement your visualization, the ESPHome configuration works fundamentally the same.
Design
Each push button and each LED needs to be connected to GND and a dedicated GPIO.
Push Buttons
Each push button needs a dedicated GPIO. You may want to use one of the input-only GPIOs. Enable the pullup resistor. If the GPIO has no built-in pullup resistor, add an external one.
In the ESPHome configuration, each push button is configured like this:
binary_sensor:
- platform: gpio
name: button_channel1
pin:
number: GPIO4 # adjust to the GPIO that you use
inverted: true # when button is pressed, GPIO is LOW. Invert this.
mode:
input: true
pullup: true # makes sure the GPIO is not floating (undefined) when button is not pressed
filters: # debouncing
- delayed_on: 10ms
- delayed_off: 10ms
LEDs
Each LED requires a dedicated GPIO that can be used in output mode. Do not use input-only GPIOs.
In the ESPHome configuration, each push button is configured like this:
output:
- platform: gpio
pin: GPIO2 # adjust to the GPIO that you use
id: 'led_channel1'
Wiring
Slow Website?
This website is very fast, and pages should appear instantly. If this site is slow for you, then your routing may be messed up, and this issue does not only affect done.land, but potentially a few other websites and downloads as well. Here are simple steps to speed up your Internet experience and fix issues with slow websites and downloads..
Comments
Please do leave comments below. I am using utteran.ce, an open-source and ad-free light-weight commenting system.
Here is how your comments are stored
Whenever you leave a comment, a new github issue is created on your behalf.
-
All comments become trackable issues in the Github Issues section, and I (and you) can follow up on them.
-
There is no third-party provider, no disrupting ads, and everything remains transparent inside github.
Github Users Yes, Spammers No
To keep spammers out and comments attributable, all you do is log in using your (free) github account and grant utteranc.es the permission to submit issues on your behalf.
If you don’t have a github account yet, go get yourself one - it’s free and simple.
If for any reason you do not feel comfortable with letting the commenting system submit issues for you, then visit Github Issues directly, i.e. by clicking the red button Submit Issue at the bottom of each page, and submit your issue manually. You control everything.
Discussions
For chit-chat and quick questions, feel free to visit and participate in Discussions. They work much like classic forums or bulletin boards. Just keep in mind: your valued input isn’t equally well trackable there.
(content created Apr 18, 2025)