Adding MQTT garage status to my card

Hi.
I made the garage opener whit esp8266+Tasmota.
I have configured all the automation in the tasmota.
Tasmota is publishing status messages to hass but i don’t know how to setup mu card to show the messages.
i have this messages published by Tasmota:

 00:35:06 MQT: stat/tasmota_9FAA78/RESULT = {"POWER1":"ON"}
00:35:06 MQT: stat/tasmota_9FAA78/POWER1 = ON
00:35:06 MQT: tele/tasmota_9FAA78/STATE = {"Time":"2021-02-02T00:35:06","Uptime":"0T01:10:35","UptimeSec":4235,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":27,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"pacoso1","BSSId":"54:E6:FC:E7:BC:76","Channel":9,"RSSI":56,"Signal":-72,"LinkCount":1,"Downtime":"0T00:00:04"}}
00:35:06 MQT: stat/tasmota_9FAA78/RESULT = {"POWER1":"OFF"}
00:35:06 MQT: stat/tasmota_9FAA78/POWER1 = OFF
00:35:08 RUL: SWITCH1#STATE=0 performs "backlog event Closing"
00:35:08 MQT: stat/tasmota_9FAA78/RESULT = {"Event":"Done"}
00:35:08 RUL: EVENT#CLOSING performs "Backlog var1 0; var2 0; var3 0; var4 1; ruletimer1 15; event PState=CLOSING"
00:35:08 MQT: stat/tasmota_9FAA78/RESULT = {"Var1":"0"}
00:35:08 MQT: stat/tasmota_9FAA78/RESULT = {"Var2":"0"}
00:35:08 MQT: stat/tasmota_9FAA78/RESULT = {"Var3":"0"}
00:35:09 MQT: stat/tasmota_9FAA78/RESULT = {"Var4":"1"}
00:35:09 MQT: stat/tasmota_9FAA78/RESULT = {"T1":15,"T2":0,"T3":0,"T4":0,"T5":0,"T6":0,"T7":0,"T8":0}
00:35:09 MQT: stat/tasmota_9FAA78/RESULT = {"Event":"Done"}
00:35:09 RUL: EVENT#PSTATE performs "publish stat/tasmota_9FAA78/STATE CLOSING"
00:35:09 MQT: stat/tasmota_9FAA78/STATE = CLOSING
00:35:14 RUL: SWITCH2#STATE=1 performs "backlog event Closed"
00:35:14 MQT: stat/tasmota_9FAA78/RESULT = {"Event":"Done"}
00:35:14 RUL: EVENT#CLOSED performs "Backlog var1 0; var2 1; var3 0; var4 0; ruletimer1 0; event PState=CLOSE"
00:35:14 MQT: stat/tasmota_9FAA78/RESULT = {"Var1":"0"}
00:35:14 MQT: stat/tasmota_9FAA78/RESULT = {"Var2":"1"}
00:35:14 MQT: stat/tasmota_9FAA78/RESULT = {"Var3":"0"}
00:35:15 MQT: stat/tasmota_9FAA78/RESULT = {"Var4":"0"}
00:35:15 MQT: stat/tasmota_9FAA78/RESULT = {"T1":0,"T2":0,"T3":0,"T4":0,"T5":0,"T6":0,"T7":0,"T8":0}
00:35:15 MQT: stat/tasmota_9FAA78/RESULT = {"Event":"Done"}
00:35:15 RUL: EVENT#PSTATE performs "publish stat/tasmota_9FAA78/STATE CLOSE"
00:35:15 MQT: stat/tasmota_9FAA78/STATE = CLOSE

And in hass i have only the entities discovered by hass from Tasmota.

My question is how do i add status information in my card that will show only this 3 state messages:

MQT: stat/tasmota_9FAA78/STATE = CLOSE
MQT: stat/tasmota_9FAA78/STATE = OPEN
MQT: stat/tasmota_9FAA78/STATE = STOP

You can create a mqtt sensor which will show the status of the garage. It would look like this. Just add this to your config, then save, check config and restart. this will create a new sensor with the state of garage

sensor:
  - platform: mqtt
    name: "Garage Door Status"
    state_topic: "stat/tasmota_9FAA78/STATE"

You can use this sensor in your lovelace cards.

2 Likes

Thank you.
I was working on the same thing and you help me a lot, just in the right time.

2 Likes