This blueprint provides full support for the Sonoff R5 6‑button remote when used through the eWeLink‑Remote Gateway Add-on.
The add-on exposes R5 button events via MQTT, and this blueprint maps all of them into clean, configurable Home Assistant actions.
Each of the 6 buttons supports:
- Single Click
- Double Click
- Long Click
That gives you 18 fully customizable actions.
Requirements & Usage Conditions
This blueprint requires the eWeLink‑Remote Gateway Add-on. It depends on it! It is the component responsible for:
- discovering the R5 remote,
- decoding button presses,
- and publishing them as MQTT device events.
To ensure correct operation:
The add-on must be running
Passive Mode must be enabled
Passive Mode is essential because it allows the gateway to listen for BLE packets from the R5 and convert them into MQTT device triggers.
If you don’t have the add-on repository yet, you can add it easily. Go to Settings → Add-ons → Add-on Store → ⋮ → Repositories and paste the URL:
https://github.com/iHost-Open-Source-Project/hassio-ihost-addon
Install and follow instructions that come along with the add-on. Visit the eWeLink-Remote Gateway page for more details.
If your setup uses a BLE proxy (e.g., ESP32 running ESPHome), you must also install the BLE Passthrough integration from HACS:
BLE Passthrough ensures that BLE packets from the R5 are forwarded correctly to the eWeLink‑Remote Gateway.
Features
- Full support for all 6 buttons
- 3 actions per button (Single / Double / Long)
- 18 action selectors in a clean UI
- Works with an MQTT broker
- Designed specifically for the eWeLink‑Remote Gateway Add-on
- Supports all HA automation modes
Finally → Blueprint Import (MY link)
FAQ — Frequently Asked Questions
-
Does this blueprint work without the eWeLink‑Remote Gateway Add-on?
No.
The blueprint relies on MQTT device triggers generated exclusively by the eWeLink‑Remote Gateway Add-on.
Without this add-on, Home Assistant cannot receive button events from the R5. -
Do I need to enable Passive Mode?
Yes — this is required.
Passive Mode allows the gateway to:
- listen for BLE packets,
- decode R5 button presses,
- publish them as MQTT events.
Without Passive Mode, the R5 will not report clicks.
-
I use a BLE proxy (ESP32). Do I need anything extra?
Yes.
BLE proxies intercept BLE packets, so the gateway won’t see them unless you install it. -
Why is there a delay: 0.4 in the action section?
This delay is intentional and important.
The eWeLink‑Remote Gateway sends button events in a sequence where:
- Single Click arrives immediately,
- Double Click arrives slightly later,
- Long Click arrives after holding the button.
If the automation reacted instantly, Single Click would fire before the system had time to determine whether the user intended a Double or Long Click. The 0.4‑second delay acts as a “decision window”
It ensures:
- Single Click doesn’t fire prematurely
- Double Click is detected reliably
- Long Click doesn’t trigger Single Click first
0.4 s is the optimal balance between responsiveness and reliability.
-
Can I change the delay?
You can, but it is not recommended. Shorter delays break Double Click detection. Longer delays make the remote feel sluggish. -
Can I use this blueprint with other Sonoff devices?
Yes — with Sonoff SNZB‑01M (Orb) in eWeLink Remote mode
SNZB‑01M supports Single Click, Double Click, and Long Click. It uses the same MQTT event structure as R5, but has 4 buttons instead of 6.
Here is the dedicated blueprint for SNZB‑01M:
Not compatible with Zigbee mode
SNZB‑01M in Zigbee mode behaves like a standard Zigbee button and does not use MQTT device triggers. If you prefer to use SNZB‑01M in Zigbee mode (ZHA), here is a dedicated blueprint for that mode: Sonoff SNZB‑01M Remote (ZHA) — 16‑Action Event-Based Control
Feedback
If you find this blueprint useful or have ideas for improvements, feel free to comment.
Enjoy your fully customizable Sonoff R5 remote in Home Assistant!
