Total expenses with utility meter

I am scraping the expenses via email, works fine with the below template

phonepe_exp:
     friendly_name: 'Last PhonePe'
     unit_of_measurement: '₹'
         
     value_template: > 
         {{ state_attr('sensor.phonepe_email','subject') | regex_findall_index("₹ *([0-9\.]+)") | replace("₹ ","") | round(2) }}
     attribute_templates:
       seller: >
         {{ state_attr('sensor.phonepe_email','subject') | regex_findall_index(" *to *(.+)")}}
     

But when I tried to use an utility meter to to add them to track daily expenses. the Sensor behave little wired, it waits for the second value of the sensor and them starts to subtract it from the 1 value and then add the 3rd value.

any help to achieve the total would be great!