Getting Day, Week, Month and Year energy consumption as a sensor from the energy tab of home assistant

Hello guys, small question.

I’m trying to build a telegram to ask him the daily, weekly, monthly and yearly KWh consumption of my house.
I’ve got a home_assistant_glow running and i’m checking the data through the Energy tab that home assistant offers at the moment.
I would like now to get the data (daily, weekly, monthly and yearly KWh) from this page to then use it.

I’ve tried using a Scrape sensor without success.
What would be the best way to get this data ?

Try something like setting some input_number helpers and update their values via automations at every intervals you want.

You’ll have to template the calculations to get the delta for the interval you want.