SolarCost - solar, time-of-use costs and electricity bill estimates

Hi everyone,

I’ve built SolarCost, a custom integration that turns your energy readings and electricity tariff into estimated bills, with one card to explore the numbers.

I wanted to see how much electricity was costing across different time bands, especially cheap EV charging periods, and how much solar export was offsetting the bill.

SolarCost supports:

  • Solar generation, household consumption, grid import and grid export.
  • Configurable time-of-use import prices and export payments.
  • Optional standing charges, monthly fees, discounts and VAT adjustments.
  • Daily, weekly, monthly, last-month and yearly totals, plus configurable longer reporting windows.
  • Custom date ranges to match your actual billing period, including two-month bills.

The bundled card has three views: Overview for energy totals and the estimated bill, Costs for a breakdown by tariff band with an export-credit bar, and History for interactive energy and bill charts. It supports Home Assistant’s visual card editor.

Everything runs locally. You supply four cumulative energy sensors; if you only have power readings, you can use Home Assistant’s Integral helpers to convert them first.

A couple of limitations: tracking starts when you configure SolarCost, so it doesn’t backfill older readings. These are estimates, and accuracy depends on your meters, their update frequency and your tariff configuration.

You can install it through HACS → Custom repositories, using category Integration:

The README covers installation, tariff setup and the card.

It’s an early project, and I’d welcome feedback - particularly from people with different tariffs, billing periods or inverter setups. Bugs and suggestions are welcome on GitHub!

1 Like

Nice, I could use this, I’ll give it a spin at the weekend

nice, i love it.

I tried but I got stuck at initial configuration due to error “Use a different sensor for each energy source”. In my case “Grid import energy meter” and “Grid export energy meter” are values provided by the same energy meter so I cannot proceed. TIA.

Installed, I’ll report back in a few days. I think I have this correct for Energia Smart Day Night plan


Edit: I think it is correct ex VAT. VAT is 9%

1 Like

Looks about right to me - just check if your price is including or excluding VAT. I’m on energia smart drive plus and have VAT set to 0% since my price is given incl VAT.

SolarCost needs four separate energy entities, one per source. “The same meter” usually means one physical device, but a bidirectional meter normally exposes two distinct entities: one for imported energy and one for exported energy. Open the device in Settings → Devices & services and pick those two different sensor.* entities (both in Wh/kWh/MWh, state class total or total_increasing). That clears the error.

If your meter instead provides a single signed grid sensor (positive = import, negative = export) or one net register, that can’t be used directly - SolarCost needs the two directions split apart. Use the included custom_components/solarcost/power_meters.yaml package (README → “Power-to-energy helpers”) or Home Assistant Integral helpers to create separate non-negative import and export energy sensors, then select those two helpers in SolarCost.

Yeah, I only re-signed with them 2 weeks ago and have an email with both prices so it’s probably cleaner to just do all without VAT and set it.

Is historical data (viewing/tracking past periods rather than just current) on your roadmap at all? If not, would it be worth me opening a feature request for it, or is that already something you’re planning/tracking elsewhere? Happy to file an issue if it’s useful to you.

My tariff optimiser might be of use to you: GitHub - colfin22/tariff-optimiser: Compare Irish electricity tariff plans against your own ESB Networks smart-meter data (HDF import) — see what each plan would really cost you, with nightly ingest and price-change alerts. Self-hosted, MIT. · GitHub

Looks good…
Is it (or can it be) possible to use an input_number entity against the rates

another Energia customer here and have HA mostly matching my bills using the inbuilt HA Energy tracking along with various templates, etc to get the import/export TOU rates right…be interesting to give this a go too to see what it throws out…

SolarCost’s Current import rate and Current export rate sensors can drive the price in HA’s Energy dashboard, so you can drop the input_number/template setup entirely.

Map them straight across. Base rates (outside any band) import 0.2865 (Day), export 0.185. Then add a time band for each other window using your template’s times:

Band Import Export
Peak 0.3217 0.185
Night 0.1575 0.185
EV 0.1575 0.185

When Energia changes a price, update it in Configure → Rates/bands — it reprices from that point on.

1 Like

And just like that they’ve notified of price increases :sad_but_relieved_face:

1 Like

Course they have. 30 days to switch and they’ll waive the fee. I’m on a 20% discount contract til November so i’ll switch around then.

I’ve a 32% disc so might hang around with them…

That’s why was asking about maybe using an input_number as the rate in the Integration…can automate the input_number to change at midnight when rate increases (as seems to be the trend now :person_shrugging:t2: )…

maybe we’ll have a sunny winter and we’ll all be grand with PV :smiling_face_with_sunglasses:

Version 0.3.0 has been released, implementing multi-tiered block tariff structure based on monthly total consumption thresholds, as used by utility providers in regions like Sri Lanka (CEB/LECO) - requested in Feature request · Issue #6 · jouwdan/SolarCost · GitHub