Calculate monthly energy cost based on daily cost

Hello, I need a little help for my configuration.
I use the app Bright with the Hildebrand Glow (DCC) integration to get my electricity and gas consumption into HA. The Bright app doesn’t show my tariff so I created a sensor that calculates my daily spending based on kWh I use. Now I want to create a sensor that everyday sums previous daily values so I can get the monthly cost so far during the month. Any suggestions?

     - name: electricity_gas_cost_day
       unit_of_measurement: '£'
       icon: 'mdi:currency-gbp'
       state: "{{ ((((states('sensor.electric_consumption_today') | float * 20.871) + (states('sensor.gas_consumption_today') | float) * 4.055 ) | round(2)) / 100) + 0.5014 }}"