Make a Wemos D1 Mini send a mqtt message when woken up

Hi everyone,
This is my first time using ESPHome. I have a couple of Wemos D1 Mini because I am building a resistive touch wifi button that is battery powered. Since it is battery powered, I need its power consumption to be as low as possible. In order to achieve this, I will program my D1 Mini to go to deep sleep after a very short time. Then, with a very simple circuit and a capacitive touch button, I will short RST and GND to reset the Wemos D1 Mini and wake it up.
What I am unable to do, however, is to make the Wemos D1 Mini send a mqtt message whenever it is woken up, so that I can use it as a normal button.

Many thanks for the help!

You are thinking of a birth message e.g.

  username: yourmqttusername
  password: yourmqttpassword
    topic: anythingyouwant
    payload: anything you want
1 Like

Thank you so much!!! It was so easy!