How do I detect Tasmota counter increment?

I have a Tasmota:ed Sonoff Basic with a counter that increments when I press the built-in button (GPIO 0), see image.

On the Tasmota page, the counter increases when I press the button. How can I make HA react to the counter increments in an automation?

from a quick google search, it appears as if mqtt is the only want to interface a tasmota sonoff device with HA.

So you need to create a broker, then create messages that link to it.

all the mqtt info you need is in the docs page on the sidebar:

Thank you!

I have the built-in HA mqtt broker setup and running, and have two-way sync between HA and Tasmota (with regards to the relay). What I’m looking for now is what I need to add to my customization.yaml file (1) for the counter to be visible in HA and (2) to use a counter increment as a trigger for an automation.

When I check the Tasmota console, the counter isn’t sent via mqtt.

I think this is a question for tasmota, maybe they have a forum. You need to get the counter over mqtt via the tasmota console. People here wont be able to help you unless someone else has that device.

OK, thanks, I got it figured out!

What did you do? It would be nice if you could post your solution and check ‘solved’ on your post for future users who have these devices.

I remapped it to Button2 instead and followed the advice in this reply on Reddit and had it working beautifully!

Hi,
can you please post your configuration or rule on how you did this?
I would also like to have tasmtoa count when a relay is turned off.

Thank you!