I’ve been migrating from ST/Tuya to HA this month with great success, but I have 1 major thorn. In my kitchen I have a 3-way light using 1 Gosund SW6 & 1 dumb 3-way. the default tasmota config for the Gosund expects 2 3-way switches w/3 toggles (traveler1, traveler2 & LED), but I found a user who modified his config to be able to use a single Gosund w/2 toggles (LED & relay).
in this configuration, the LED (POWER1) always indicates the true state of the light (ie when the physical light toggles, the LED also toggles - regardless of how the light was turned on). but the relay (POWER2) will only toggle if you press the Gosund switch (it will NOT change if the light is toggled on/off at the dumb switch).
so I’m trying to come up w/a HA virtual switch where 1) the status of the vswitch (on/off) always updates from POWER1 (and never from POWER2), and where 2) toggling the vswitch will toggle POWER2 - but 3) if the LED status (POWER1) was changed by pressing the dumb switch, do nothing except show the correct status (ie, don’t change POWER2).
here are the 2 mqtt entries for the switch, although I don’t think that really matters in this case, because I’m pretty sure I’ll be creating a new virtual switch for the automation.
- platform: mqtt
unique_id: kitchen_led
name: "Kitchen LED"
state_topic: "stat/kitchen/POWER1"
command_topic: "cmnd/kitchen/POWER1"
- platform: mqtt
unique_id: kitchen_switch
name: "Kitchen Switch"
state_topic: "stat/kitchen/POWER2"
command_topic: "cmnd/kitchen/POWER2"
and here are the console commands I found to program the Gosund:
Template: {"NAME":"Gosund SW6","GPIO":[17,0,56,0,9,0,0,0,0,0,22,21,158],"FLAG":0,"BASE":18}
SwitchTopic 0
switchmode1 1
Rule1 ON Switch1#state do Power1 2 endon
Rule2 ON Button1#state do Power2 2 endon
Rule1 1
Rule2 1