Adding Gas and Cost the Energy Dashboard(variable rates, fixed rates, unit conversions)

So I am starting to work on getting my energy dashboard set up. I am working on gas first as I wait for my emporia view and espcam.

My gas meter integration comes in as ft³. My rates are per GJ. However I also have several other fees tied to gas usage. Most are $/GJ that I am using multiscrape to pull off my gas providers website. I also have a carbon tax($/GJ), municipal franchise fees(35% of all the additional fees from the gas provider), and a fixed delivery charge)currently $1/day but also scraping this value as it can change)

There is also a conversion factor at play here that can change month to month that my provider uses to convert my ft³ to GJ. This is unfortunately not possible to track besides waiting for my bill to see it.

I am debating the best way to set up my dashboard for accurate cost tracking.

First, I can sum all my $/GJ and then take the average of the past 12 months conversion factors and convert to ft³. Not perfect but the closest I can get to estimating my cost day to day.

Now, an entity tracking the price/ft3 would be simple but then I would always be off by $28-31 by the end of the month as the fixed rate would be impossible in this case of the fixed daily rate.

So I’m thinking of creating my own cost entities for daily, monthly and yearly. Should be simple enough to template my * + for my daily. Use day of the month for monthly, etc.

My question is…which cost entity should I use for the entity tracking total cost option when setting up the dashboard. If I use the daily option will I lose the previous days data each day?

As long as the entities have the correct state class and handle resets correctly, it does not matter if you use a daily, monthly, yearly, or lifetime cost sensor.

Energy dashboard works by looking at the change in long term statistics over each hour, and understands how to handle reset cycles. It will be able to show you the correct cost over the viewed period in the dashboard regardless of the reset cycle of the source entity.

So I must of don’t something wrong.

My cost entity is tracking correctly. I had an issue with a decimal place yesterday so HA though I had used $2000 of gas(non-issue I fixed it for today)

However, when my cost sensor resets my value went negative for today…