You didn’t really state WHY you are using the thing you asked for help with. I would guess that is because you have something that is generating some data and it has multiple values that interest you.
The idiomatic way in esphome is to create a custom component to do this and make it easy for everyone else to use it. Unfortunately, the barrier to entry for external component is quite high and the documentation is quite lacking, which makes it incredibly difficult for most people.
Luckily, there is this: Easy UART Parsing ESPHome Component
I have not tried it, since my use case is even more problematic (it involves 9-bit serial with different packet types in a binary format) so I am doing it with an external component.
The easy part of the easy-uart-parsing is likely in comparison to creating your own external component (which is most definitely in the difficult area).