SwitchBot Plug Mini
| Chip | ESP32-C3 |
|---|---|
| Form factor | US smart plug (15 A) |
| Flash | 4 MB |
| Antenna | PCB antenna |
| Install | SwitchbOTA over WiFi, else serial (case is welded; see notes) |
| Stores | amz/us |
| GPIO | Function | ESPresense setting |
|---|---|---|
| 6 | Relay | Outputs |
| 7 | White LED (active low) | LEDs |
| 8 | Status LED (active low) | LEDs |
| 2 | Button (active low) | Inputs |
| 18 | BL0937 CF | Power monitor |
| 19 | BL0937 CF1 | Power monitor |
| 20 | BL0937 SEL (inverted) | Power monitor |
Template
Section titled “Template”Paste this into the Board Template box on the node's Templates page, then Preview and Apply (firmware v5.0.0b1 or later). It sets the board's pins (and Ethernet type, if it has one) in one go. The LED, input and output lists replace what was configured before, so the result doesn't depend on the node's old setup. See Templates.
{"name":"SwitchBot Plug Mini","chip":"esp32c3","settings":{"leds":[{"type":"pwm_inverted","pin":7,"count":1,"control":"output","output":1},{"type":"pwm_inverted","pin":8,"count":1,"control":"status"}],"inputs":[{"name":"Button","role":"button","pin":2,"type":"pullup_inverted"}],"outputs":[{"name":"Relay","pin":6,"type":"output","power_on":"restore","input":1}],"power":{"model":"bl0937","cf":18,"cf1":19,"sel":20,"sel_inverted":true,"voltage_divider":1450,"current_resistor":0.0011}}}Formatted, with what each value means
{
"name": "SwitchBot Plug Mini",
"chip": "esp32c3",
"settings": {
"leds": [
{
"type": "pwm_inverted",
"pin": 7,
"count": 1,
"control": "output",
"output": 1
},
{
"type": "pwm_inverted",
"pin": 8,
"count": 1,
"control": "status"
}
],
"inputs": [
{
"name": "Button",
"role": "button",
"pin": 2,
"type": "pullup_inverted"
}
],
"outputs": [
{
"name": "Relay",
"pin": 6,
"type": "output",
"power_on": "restore",
"input": 1
}
],
"power": {
"model": "bl0937",
"cf": 18,
"cf1": 19,
"sel": 20,
"sel_inverted": true,
"voltage_divider": 1450,
"current_resistor": 0.0011
}
}
}LED type: pwm, pwm_inverted, grb, grbw, rgb or rgbw (the last four are addressable). LED control: mqtt, status, motion, count, or output (follows the output numbered byoutput). Input type: pullup, pulldown or floating, with_inverted for active-low. Output type: output, output_inverted, or high/low for a pin that's just held at that level. An output's input is the 1-based input that controls it. power takes ESPHome's hlw8012 values (a cse7766 needs only rx); sel_inverted matches ESPHome's inverted on sel_pin. eth is the Ethernet Type's option number.
Flashing
Section titled “Flashing”SwitchbOTA replaces the stock firmware over WiFi, no disassembly needed. It works on stock firmware up to 1.4, and on 2025–2026 units that ship with v1.8 as long as you don’t accept the v2.x update in the SwitchBot app first. It’s unknown whether it works after v2.7. If the OTA route is closed, you’ll need serial, and the case is welded shut.
- The relay is output 1. It shows in Home Assistant as a switch named Relay, and MQTT
espresense/rooms/<room>/output_1/settakesON,OFForTOGGLE. The button toggles it, and after a power cut it returns in its last state. The white LED follows the relay; the other shows status. - Power monitoring uses the BL0937 with digiblur’s ESPHome calibration (
voltage_divider1450,current_resistor0.0011). Reports power, voltage, current and energy every 10 s. SEL is inverted here (sel_inverted: true, as in that config). - Always-on loads such as a robot vacuum dock: set the output to
"power_on": "on", "input": 0. The plug then always powers up on, and a bump of the button no longer cuts the dock. Home Assistant can still switch it, and it still reports power.