Access content of Statistics Card over API

Hey everyone,

I’m trying to get the values of the Statistics Cards on my Dashboard to outside of home assistant. The Values that are displayed are the energy used yesterday, this month, last month and so on. Do you guys have any idea how I can extract these values from Home Assistant? Via API or Scraping the page maybe?

Thank you in advance!

Use the HA REST API to return the state objects of entities. See:

In particular /api/states/<entity_id>

Hi!
I think the question was more from the angle if there is a ready-made API available to access the Statistics portion of “History”.
If not, I would look from angle of extracting it to a “custom API” from DB (or make a proxy-sensor with statistics access inside HA if statistics can be accessed from templating?) and expose it to outside via history/state API.