Custom_component reading from serial in a different thread blocks a thread for ever

I’m trying to write a custom_component for my device. The device have some misc binnary_sensors, and switches. For it I have to read from the serial binary protocol to catch binary_sensor events. Writing to serial works perfectly, but when I’m trying to read from the serial the program blocks. I can see that the data is coming on the the terminal…

When I comment the line pointed by arrow, then the logs are coming trough, and the program logs a line ever second:

the full code of my

Please help me I’m stuck on this for over a week, and have no idea what to do to make it work.

Thanks in advance