Cumulative and consumption for gas energy dashboard


I’ve been using HA not for too long, so bear with me for my lack of knowledge :slight_smile:

I’m using a dedicated web server to gather energy consumption (WES server, from a french company)
I’ve succesfully created a sensor in HA to get data from the WES server, including the Gas consumption.

the original data is located in a JSON file, which I connect to, using the “REST” platform, and by parsing the JSON.
The data inside the file is cumulative, and in m3, and reseted to 0 every day
so my sensor is using state_class: total_increasing

I have created a card in my dashboard, that shows the increasing consumption
I have added the sensor to the energy dashboard for the Gas consumption.

Now the question ! :slight_smile:
how come that the entity card in my dashboard show the cumulative value (extracted from the distant JSON file), but inside the Energy dashboard I can see the realtime consumption ?
Is the dashboard is simply showing a substraction between the N+1 value and the N value ?
Is there a way to get this value and use it somewhere else ? in a script or automation ?

more explanation :slight_smile:
This is the source in m3
gaz WES

This is my sensor in my dashboard:
gaz HA

This is the energy dashboard:

How can i access in real time the values used by the dashboard ? or do I have to calculate them myself ?
The question is also more general on how does the dashboard works.

Hope i was clear enough,
Thx a lot