Energy Monitoring - costs disappearing from dashboard?

I use the in-built energy monitoring to keep a track of my usage and costs. I’ve noticed that while the energy usage is kept indefinitely (?), some of the cost data appears to be vanishing from the dashboard after a few weeks. e.g.

I use the same price entity for all electricity usage (I get charged at a different rate between 2am and 6am), and this meter is used for all electricity sources, apart from “standing charge”.

      friendly_name: Bulb EV
      unit_of_measurement: GBP/kWh
      value_template: >
        {% set tariff = { "HT": 0.3776, "LT": 0.1131 } %}
        {% if ((200 <= (now().hour * 100) + now().minute <= 600)) %}
          {{ tariff.LT }}
        {% else %}
          {{ tariff.HT }}
        {% endif %}  

Any clues about why I’m losing the costing for this channel? One note, is that my recorder is set for 30 days retention, but other energy channels don’t seem to be getting purged.

1 Like

I have the same issue. I also have recorder set ut and belive that is the issue. do we have to exclude the cost entity and store all the price data from all past to have correct cost in HA energy?

1 Like

Glad it’s not just me - surprised more people haven’t noticed and/or complained about this. Are you also using a custom price entity? My understanding was that the HA energy data was not purged at all, but maybe there are exceptions when using price entities that don’t fall under this.

Bumping this up to see if anyone else has observed this or has any sort of solution for it