Ps both sensors were using the time variable shown under import. I just changed the export to simplify it but that difference has only just occurred so won’t explain the discrepancy in costs today.
I think when you dont have your own total cost entity HA creates one. I can’t recall it’s name but try searching your entities page for “cost” or “consumption” or similar and see if you can locate them. Might provide some guidance on how that number has changed over the day and point you to the issue
Thanks for sharing your Flux tariff config. Would you be willing to share more about how you have this configured in addition to the above sensors? I’m still getting my head around templates, sensors and automation etc.
Seeing as OP didn’t reply, here’s my fixed version. You just put this block in configuration.yaml and then add the cost sensor in the energy dashboard grid consumption configuration
Thanks for this code, which I have added to my HomeAssistant setup. After a few days, HA is showing numbers for the Import and Export in the energy dashboard. However, both Import and Export Energy and Cost figures are negative. I would have thought one or other should be positive?
I notice that the tariff rates you’ve entered above (which I’ve adjusted for my current Flux tariff) are all positive when surely the Export Cost should be negative?
Apologies if I’ve misunderstood anything! I’m still an HA newbie…