Will Smidlein's Blog

Posts tagged "ev"

EV Accounting

I recently leased a Hyundai Ioniq 5. I did not (and do not) need another car, I did not want another car, I just lowballed the hell out of a dealer and was utterly shocked when he said he’d do the deal.

It’s quite nice.

EVs have come a long way since I had my 2019 E-Golf. Public charging infrastructure has somehow gotten… worse? Which I truly did not believe was possible. But alas it’s not something I have to worry about (as much) this time around because I have a home EV charger.

I went with an Emporia mostly because I already have their whole-home energy monitoring and I figured it would tie in nicely. It was also $120 cheaper than the Chargepoint which helped. These things are remarkably simple so it seemed dumb to spend more than the bare minimum.

I have it configured to only charge during my utility’s off-peak hours so the cost is absurdly low- less than 1/10th the cost to drive the equivalent distance in my Subaru.

Alas, it’s not nothing. And therefore it must be accounted for. With gas it’s easy; every time I swipe my credit card at a transaction, I categorize it as “Gas- {car}” in YNAB and then at the end of the month I get a nice tally of how much I spent on gas per vehicle in my fleet.

With EVs, it’s part of the electric bill, and it’s not easily separated out by the utility company (they don’t know if you used your power to charge your EV or to run your oven).

I already have a script that extracts the line items from my utility company’s PDF bills and creates split transactions, so I figured I could simply use the Emporia API to figure out how much I spent on EV charging in that time period and add another line item.

Turns out Emporia doesn’t have an API. Or at least, they don’t have a public one. Luckily somebody has already done the heavy lifting which made adding the EV Charging Report endpoint quite easy.

Now every time I run my script, it will reach out to the Emporia API and ask “how much of this electric bill was EV charging?” and properly categorize.


report = vue.get_ev_charging_report(EVSE_ID, billStartDate, billEndDate)
total_cost = report.charging_cost

description = f"{report.energy_kwhs:.2f} kWh"

What will I do with this information? Absolutely nothing.