devices.esphome.io
DETA Grid Connect Smart Switch Single Gang Two-Way (6951HA)
DETA Grid Connect Smart Switch Single Gang Two-Way (6951HA)
Device Type: switchElectrical Standard: auBoard: bk72xxDifficulty: Plug-n-flash, 2/5
Overview
The DETA Smart Switch Single Gang Two-Way (6951HA) is part of the Grid Connect ecosystem, and is sold at Bunnings in Australia.
Also known as:
- Smart Single Gang 2 Way Touch Light Switch (Deta website)
- Single Gang 2 Way Touch Light Switch (Grid Connect website)
Variations
As shown on the front of the packet.
Variation | Microcontroller | Board | Firmware | Flashing methods |
---|---|---|---|---|
Series 1 | Beken BK7231T | Tuya WB3S | v1.1.5 | Cloudcutter |
Setup Guide
Cloudcutter
Cloudcutter is a tool designed to simplify the flashing process. Follow the official guide for instructions.
You can use the “Lonsonho” brand “X801A 1-Gang Switch” option in Cloudcutter.
Manual Flashing
Manual Flashing has not been tested on this specific model, but other models with the same chip have been tested and these manual steps work, you'll need a USB to serial adapter. Follow the disassembly steps below:
- Remove the front plastic face.
- Unscrew the two exposed screws.
- Remove the clear panel and the small PCB underneath.
Tip: You can convert these switches to ESPHome by replacing the WB3S chip with an ESP-12E or ESP-12F chip and adding a 10k pull-down resistor on GPIO15.
GPIO Pinouts
Series 1 (WB3S) GPIO Pinouts
See Pinouts on WB3S Module Datasheet for more detail
Pin | Function |
---|---|
P24 | Status LED (inverted) |
P26 | Button (inverted) |
P14 | Relay and Button LED |
P8 | Light activation status, taking into account the local activation (this device) xor the remote activation (another device) (inverted) |
Note: Each relay shares a pin with its associated LED.
Advanced Modifications
To gain individual control of button LEDs, remove specific diodes and solder a wire from the cathode side of the diode pad to a spare GPIO pin. See this example.
Configuration Examples
Series 1 (WB3S) Configuration Examples
substitutions: device_name: "deta-2-way-1-gang-switch"
friendly_name: "DETA 2 Way 1 Gang Switch" light_1_name: "${friendly_name}" light_1_icon: "mdi:light-recessed"
esphome: name: ${device_name} friendly_name: ${friendly_name}
bk72xx: board: wb3s
wifi: ssid: !secret wifi_ssid password: !secret wifi_password
logger:
status_led: pin: number: P24 inverted: true
light: - platform: binary output: filter_1 id: light_1 name: "${light_1_name}" icon: "${light_1_icon}"
binary_sensor: # Buttons - platform: gpio id: button_1 pin: number: P26 inverted: true mode: INPUT_PULLUP on_press: then: - light.toggle: light_1 internal: true
# Activation statuses # Represents the "local" relay (this device) XOR the "remote" relay (another device). # It only shows TRUE if one of the "local" or "remote" relays are active, but not both. - platform: gpio id: activation_status_1 pin: number: P8 mode: INPUT inverted: true internal: true
switch: # Relay - platform: gpio id: relay_1 pin: P14 internal: true
output: # Filters # Triggered when the "light" entity is turned on or off. Will only toggle # the associated relay if the "light" entity is out of sync with the # "activation status"; otherwise do nothing as the state is already correct. - platform: template type: binary id: filter_1 write_action: then: - if: condition: - lambda: "return state != id(activation_status_1).state;" then: - switch.toggle: relay_1
Add Reboot button to HA
switch: - platform: restart name: ${friendlyname} REBOOT