I’m sure this will be super simple for someone, but I’ve been trying code all evening and I’m stumped.
I’ve got a Sonoff SV with an extra relay connected to control my garage door (2 in total on the board now). I’ve got one relay working fine but it’s triggered by the up, down and stop buttons in HA. I only want it controlled by the up button. If I change the MQTT topic from power to Power2 then the other relay is controlled instead, so I know I’m very close.
If anyone could help me have the up button control one relay “Power” and the down button control the other relay “power2” it would be greatly appreciated. Here’s my current code: (can’t see any option to insert code for some reason so I’ll have to copy and paste it)
You will probably have to use a template cover to do what you want since the normal MQTT cover only allows one command topic with different payloads. The link below has examples of garage doors:
You will need to modify it to your use. the way you will need to do that is in the “open_cover” & “close_cover” sections you will use a mqtt_publish service with your command topics for your different relays and the required payload.