I’ve tried several things in the WebUI and the console based on what I have read, but I can’t seem to accomplish my goal. I have only been able to completely loose control of the device, or have nothing happen at all… (thankfully I take backups)… I have a Eachen ST-DC1 with an ESP8285 running tasmota connected to HA through HASSIO. The device is mounted in an enclosure with a remote push button soldered on the board to toggle the relay manually. I would like to add another button (currently soldered to GPIO 4, but that can be moved to wherever) that I would like to send an MQTT command back to HA to toggle a different device (tasmoized sonoff basic),or trigger an automation I currently have configured. Is this even possible, and if so any help that could be provided in accomplishing this would be greatley appreciated.
So I finally figured it out on my own by watchng Dr. Zzzs video and poking around. I think this is what I did. Solder the pushbutton between GPIO 14 and ground, assign it as 09 Switch1. go to console, SwitchTopic 1, Swithmode1 5, SetOption32 3. Now if the switch is tapped quickly it will toggle the relay (not what I wanted, but it’s ok), but when held for .3 seconds, it sends a HOLD command . I copied that command from the console then triggered off of it in HA. I thought I needed to trigger off a state change, but no, trigger off MQTT, the copied command, any payload “HOLD”.