Wifi disconnection infinite loop on ESP Home when I set a text sensor

I’m trying to set a text sensor in my Wemos D1 mini using ESPHome.
All the code works perfectly with no issue except for the part when I set a text sensor like this:

What happens when I upload the code to the wemos is that I get this disconnection/connection infinite loop and I can’t figure out what I’m doing wrong.
I put the log into a pastebin as I cant embed more images (new user) https://pastebin.com/5wYkQxtC

I would really appreaciate any hints.
Thanks everyone.