Hey everyone. I have a question for all you Tasmota experts.
First some background:
I have my garage door set up with a sonoff basic & Tasmota, which can open and close the door when the relay is activated, and sense the door state with a reed switch attached to GPIO14. The open/close mechanism is basically just a toggle on the garage door opener when you bridge two contact points, so I have tasmota set to open the relay 1 second after it is closed. That all works as intended.
Now the problem:
In home assistant, I have a “cover.garagedoor” set up with “platform: mqtt”, but home assistant doesn’t seem to distinguish whether or not the door is already closed when calling “cover.close_cover”. Because the MQTT commands for opening and closing the door are both the same (close the sonoff’s relay), this manifests as me saying “Hey google, close the garage door”, and the garage door then opening.
Is there a way to make tasmota listen to different MQTT commands under different circumstances? Right now it would listen for “cmnd/GarageDoor/POWER ON” and “cmnd/GarageDoor/POWER OFF”. I would like it to pehaps listen for “cmnd/GarageDoor/OPEN” (but ignore this if GPIO14 is not grounded, i.e., the door is already open) and “cmnd/GarageDoor/CLOSE” (but ignore this if GPIO14 is grounded, i.e., the door is already closed) and then in the background send itself the POWER ON command when required.
Hopefully that all makes sense. I believe there is a way to accomplish this with Tasmota’s rules, but I am far from well-versed in their usage. Can anybody help?