A Home Assistant custom integration for using Sonoff BLE devices without the need for gateways.
- Use Sonoff BLE-enabled devices directly in Home Assistant
- No need to pair with the eWeLink app
- No need for gateways (e.g. MINIR3)
- Local control via Bluetooth - no cloud dependency
- Sonoff Switch Mate (S-MATE)
- Sonoff SwitchMan Scene Controller (R5)
- Possibly other Sonoff BLE-enabled devices, not tested yet
- Home Assistant 2025.5.3 or newer
- Bluetooth adapter (and integration) configured on your Home Assistant
- Open HACS in Home Assistant
- Go to "Integrations"
- Click the three dots in the top right corner
- Select "Custom repositories"
- Add
https://github.com/yourusername/sonoff_ble
as repository - Select "Integration" as category
- Click "Add"
- Find "Sonoff BLE" in the integrations list and install it
- Restart Home Assistant
- Download the latest release from GitHub releases
- Extract the files
- Copy the
sonoff_ble
folder to yourcustom_components
directory - Restart Home Assistant
- Go to Settings → Devices & Services
- Click Add Integration
- Search for "Sonoff BLE"
- Add the integration
- Click any button on device you want to add
- Device should be auto added and visible under Settings → Devices & Services → Sonoff BLE
Once a device is discovered and added, you can create automations using the device as a trigger.
Each device provides the following triggers:
Trigger Type | Description |
---|---|
Switch N Short Press | Single quick press of switch button |
Switch N Double Press | Two quick presses of switch button |
Switch N Long Press | Hold button for 2+ seconds |
The S-MATE Has three "buttons" (marked on the device as S1-S3).
The R5 Has six buttons and supports all three trigger types. Buttons are in the following pattern:
┌─────────────────────┐
│ │
│ [1] [2] [3] │
│ │
│ │
│ │
│ [3] [5] [6] │
│ S│ <- Logo
└─────────────────────┘
When sending a lot of events in a short time, some of the events might be discarded. This is caused by BlueZ UUID caching on all Linux devices.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to everyone at the Tasmota forums for reverse engineering the eWeLink protocols
See CHANGELOG.md for version history.
⭐ If you find this integration useful, please consider giving it a star on GitHub!