Retrieve sensor values on the go

Greetings to the community

I want to develop a small device with an ESP32 and a TFT screen that with a couple of buttons, to display different content.
My question is on how to do that using queries(?)/messages(?) to Home Assistant without having to pass all the sensor values using the API
Just to elaborate a little more, what I want is when, I’m in a specific screen to retrieve ex.Temperatures and when on another to get power data. Being able to get also an array of values to do a small graph would be a bonus

thank you in advance

You do that via homesssistant sensors eg Home Assistant Sensor — ESPHome. There are also text and binary equivalents.

Right, but with the sensor I have to create an argument for each sensor; for my design this would be a huge list.
What bothers me more is that I will retrieve all these data all the time, regardless if I display them or not. What I need is to fetch only the data I need, depending on some basic UI / selection

For drawing your graph, see Display Component — ESPHome

As for your other needs, just try it.