True 3-Way Smart Switch w/ Tasmota - No rewiring!

It's here!  A smart switch that works in several different 3 way wiring configurations without any rewiring or other tricks.  Swapping out one of the 3 way switches with this one is the only requirement.  This video also shows the details of using with Tasmota for local MQTT control with Home Assistant.

Purchase 3-Way Smart Switch

Additional Parts for Flashing Tasmota if Needed
Soldering Iron Station
Helping Hands(as shown)
Alternative Upgraded Helping Hands
0.015 Solder
Female Jumper Wires
USB FTDI for Flashing

Amazon US Link

Updated with templates for the new Tasmota version

Setup your MQTT Configuration first

Tasmota Setup Commands (copy and paste each section to one line in the Tasmota Console)

template {"NAME":"Moes/Treat 3-Way","GPIO":[21,255,157,255,56,53,0,0,30,10,9,255,255],"FLAG":0,"BASE":18}

module 0

Console will Reboot. Wait for it.

backlog switchtopic 0 ; switchmode1 2 ; switchmode2 5 ; setoption32 7 ; setoption34 1 ; rule3 1

rule1 on event#ON do power2 TOGGLE endon

rule2 on event#OFF do power2 TOGGLE endon

(this is all one line below!)
rule3 on power1#boot do backlog ledpower1 %value% ; ledpower2 %value% endon on power1#state=1 do backlog rule1 0; rule2 1 ; ledpower1 %value% ; ledpower2 %value% endon on power1#state=0 do backlog rule1 1; rule2 0 ; ledpower1 %value% ; ledpower2 %value% endon on switch2#state=3 do publish stat/%topic%/switch long endon

Toggle the switch a couple times to activate the rules correctly.

Currently the Red LED is on while the light is off and the White LED is on while the lights is on.  If you want this reversed, go to Configuration, Configure Template and change Led1i to Led1, and Led2 to Led2i.  Click Save.

NOTE: You CANNOT use Auto Discovery with this switch at this time due to the split config.  Please use the configuration below.  Do not use the ON/OFF buttons in the Tasmota GUI to manually toggle the switch.  Issue an "event on" or "event off" on the Tasmota Console to toggle the switch.

Sample Home Assistant Config

- platform: mqtt
  name: "Hallway 3-Way"
  state_topic: "stat/MyHallWay/POWER1"
  command_topic: "cmnd/MyHallWay/EVENT"
  availability_topic: "tele/MyHallWay/LWT"
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"

Take note of the slightly different command topic with the EVENT command.

Additional Links
Excellent guide with various 3 way wiring configurations
Tasmota Releases
Flash ESP8266
Termite Terminal App

Internal Pictures


  1. I followed this to a tee twice with 2 separate switches with the same results. The three way switch works turning off the light from the Moes switch or the dumb switch. I can control it from the HA front end. However, no matter how i turn the light off, from HA or either switch, the stat topic POWER1 toggles on and off repeatedly.
    16:23:40 MQT: stat/Mudroom/RESULT = {"POWER1":"OFF"}
    16:23:40 MQT: stat/Mudroom/POWER1 = OFF
    16:23:40 MQT: stat/Mudroom/RESULT = {"POWER1":"ON"}
    16:23:40 MQT: stat/Mudroom/POWER1 = ON
    16:23:41 MQT: stat/Mudroom/RESULT = {"POWER1":"OFF"}
    16:23:41 MQT: stat/Mudroom/POWER1 = OFF
    16:23:42 MQT: stat/Mudroom/RESULT = {"POWER1":"ON"}
    16:23:42 MQT: stat/Mudroom/POWER1 = ON
    16:23:43 MQT: stat/Mudroom/RESULT = {"POWER1":"OFF"}
    16:23:43 MQT: stat/Mudroom/POWER1 = OFF
    16:23:43 MQT: stat/Mudroom/RESULT = {"POWER1":"ON"}
    16:23:43 MQT: stat/Mudroom/POWER1 = ON
    16:23:44 MQT: stat/Mudroom/RESULT = {"POWER1":"OFF"}
    16:23:44 MQT: stat/Mudroom/POWER1 = OFF
    16:23:45 MQT: stat/Mudroom/RESULT = {"POWER1":"ON"}
    16:23:45 MQT: stat/Mudroom/POWER1 = ON
    16:23:45 MQT: stat/Mudroom/RESULT = {"POWER1":"OFF"}
    16:23:45 MQT: stat/Mudroom/POWER1 = OFF

    Any ideas would be greatly appreciated.
    BTW I love your work and Vids. You are the reason I switched to HA from TUYA. But I am struggling a little.

  2. I bought 4 of these moes switches. There is something wrong with them. I thought it was the flash of Tasmota, but it's not. I just hooked up a new on with stock firmware on it and connected it to the smart life app and it reacts the same way. taht is my post abve BTW.


  3. Hello , in 7.1.2 the toggle 1 is reversed, when light is ON on toggle 2 the toggle 1 shows OFF.

    Would you be able to advise how to fix it?

    1. Fixed with the commands from template repository. Thank you

  4. Awesome stuff! I have the single pole version of this switch. I simply want it to operate as it should. Click button>White led on> power on, Click button> white led off> power off. I tried your config for the 3 way and it seemed to not fully work, at least the led part, I haven't tested the rest.

    1. Just need to figure out the pins of each LED, assign them as led1 and led2.

  5. Is this still the prefered method of setting up a 3way tasmota switch with a dumb switch?

  6. Can't thank you enough (again!) for these. I've had one of the TreatLife 3-way switches for awhile with the new psk2 format so no tuya-convert on it. I got a 3D printer for Christmas, so printed up the flashing jig from your other video, and flashed the switch on the first go. That jig makes it SO MUCH easier. Now with your directions above, got my switch in Home Assistant just the way I wanted it... outta the cloud.

    1. Nice job!! Once you get that first one done it is game on from there!!


Post a Comment