Pzem004t automations?

i have connected a pzem004t with tasmota and nodemcu , with HA, i can get the details but ,
now i want the energy today consumption details in a seperate file in which it should give the details according to per hour,

how to do that ?
how to do that automation ?