esphome / esphome/feature-requests
Blink Code Decoder
- Dominant language
- No language data
- Stars
- 450
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem you have/What new integration you would like**
I have a device that uses a Status LED to blink codes. The code sequence provides state information. I would like to be able to use a GPIO pin (preferred) or light sensor (optional) to decode the blink codes.
**Please describe your use case for this integration and alternatives you've tried:**
I have a gate motor that I am controlling using an ESP32. The motor's control board has a Status LED that blinks. I want to interpret the blink codes so the state can be used for automations.
Codes qre as follows
Off - Gate is closed
On - Gate is partially or fully open
Continuous slow flash - Gate is opening
Continuous fast flash - Gate is closing
One flash every two seconds - Pillar light override is activated
Two flashes every two seconds - No mains present
Three flashes every two seconds - Battery voltage is low
I've read through all the docs and tried numerous components, but none seem to be up to the task. On and Off states can be achieved using debounce filters on a binary sensor, but no solution could be found for flashing sequences.
I would like this processed on the device and have a text or select sensor show the status.
I believe this will have a wider application than just my use case, e.g. processing from the Status LED component, a VCR blink light, morse code etc.
**Additional context**
I've tried to visualise the blink codes as described above

Contributor guide
No contributing guide indexed for this repository
Research direction
No implementation files or tests are named. Start by reviewing ESPHome's existing binary sensor and light sensor components, then determine how GPIO or light input could represent the listed blink sequences and how the decoded state should be exposed. Done means the proposed feature has defined inputs, timing behavior, and a text or select sensor output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- embedded-iot
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100