Energy Costs are Negative

HI, I have a strange issue, So I have a template which calculates the cost of my daily energy.

It is essentially a daily charge, plus any usage cost (see below)

{% set supplecharge = 0.84348 %}
{% set usagecharge = 0.24761 * states(“sensor.daily_energy_total”) | float(0) %}
{{ supplecharge + usagecharge }}

The template works well, and the costs are exactly the same as when I check on my retailors website.

However when I add them as energy page as below
image

They seem to show negative costs

I assume it’s trying to do some calculations between to the two values,
So is there a way to just show the figures from my sensor, which I created. or is there another easier way to show my costs

Thanks

Anyone out there has an idea about my issue. Its seems a bit strange.

Thanks

Possibly the sensor has the wrong state class, should be total_increasing I think