Calculate energy usage and price

Hi
Im new using HA so any pointers in the right direction would be greatly appreciated
Im trying to figure out the best way to measure the energy consumption and price for 2 properties that uses 1 subscription. For hardware i have 2x qubino 3-phase smart meter. Im getting data in the energy dashboard and using an entity tracking the current hourly price.

However it seems like there is no way of using this data.

So for my project i need a way to measure:

  • Used kWh per month (this can be measured by using the utility meter)
  • Price based on hourly rate
  • Used kWh should then be multiplied with tax and transfer fee (fixed rate) and add half the subscription price (fixed rate) at the end of the month.
  • HA to send an email with:

Used kWh for that month.
Total price (price based on entity with tax and subscription fee)

You probably need an utility meter sensor:

Using the utility meter sensor i can only get the amount of used kWh but im not able to figure out how to calculate the price based on the entity for hourly tariff rate.