Hi All,
Working on a small project using Tasmota on the Wemos D1 Mini, I am connecting one of the input to a momentary switch and I have de-attached switches to relay using setoption 114.
I am getting this mqtt message when PB is pushed:
"stat/Wemos_PB/RESULT = {"Switch1":{"Action":"TOGGLE"}}"
I like to use this PB to control the output of another Tasmota device with the mqtt topic:
cmnd/HotWaterSystem/POWER
What I am trying to resolve is that, the hot water system could be in ON or OFF state, and each time when the PB is pushed, I want it to toggle the statement (ie, from ON to OFF, or from OFF to ON).
Anyone know how this can be achieved? I think this needs to be done through a function node, and I need to feed both mqtt topics into this function so that each time when the PB is pushed, it knows which state to toggle to.
Appreciated if someone can assist. Let me know if you need more details.