Energy help - strange values and missing long-term statistics

So - I’ve tried for quite some time and failed getting Tibber electricity/energy stats fully functional. Any help would be much appreciated!

Problem 1: (small) Negative consumption in Energy panel sometimes
Starting in December, I started seeing negative values in Energy panel.

Energy is configured using Tibber’s “accumulated consumption” sensor and cost sensor like below:

That accumulated sensor resets daily, is that the issue here?

Btw - the consumption totals and cost are not wildly off, just somewhat off.

Problem 2: Show electricity usage older than a few days
I have created some cards with mini-graph-panel showing the energy consumption over time. Works fine for shorter periods, but shows nothing older than a few days (I’d like to show a month for now and potentially a year later on).

Result:


(I’d like the 1 week graph to be filled and later on replace with 1 month)

Code (shortened)

          - type: custom:mini-graph-card
            entities:
              - entity: sensor.power_xyz
                name: Effekt 24h
              - entity: sensor.electricity_price_xyz
                name: Elpris 24h
            hours_to_show: 24
            points_per_hour: 4

          - type: custom:mini-graph-card
            entities:
              - entity: sensor.power_xyz
                name: Effekt 1v
              - entity: sensor.electricity_price_xyz
            hours_to_show: 168
            points_per_hour: 1

How can I save data longer-term? Obviously data is saved in some way and shown in the energy dashboard - can I use that? I’d like to have more than one bar per day optimally, at least for the month chart.

Thanks in advance!
/Victor

Problem 1: I did some more digging and realize that there seems to be a sensor (“last meter consumption”) that seems to be ever-increasing. Cost, however, is not. What is the energy dashboard expecting? I do also have a “price” sensor which I could potentially use instead of the daily-resetting “cost”.

Last meter:
image

Price:
image

Cost sensors (I do note that one has the “last_reset” property, which I saw in statistics documentation somewhere)