MyFuelPortal integration using ________ (that which shall not be named)

My propane provider was recently acquired, and they implemented an online portal which contains some useful data read from the transmitter on my tank. The service they use is called MyFuelPortal. I sought out a HA integration, but there isn’t one. This service is presumably used by fuel providers other than mine.

I am not a programmer. I feel pretty accomplished to have pieced together my very comprehensive and quite stable HA instance and dashboards on a VM using examples and help mostly from these forums.

I am also not a user of ChatGPT. But because I wanted to get this propane data into HA, I decided to ask it to make me an integration.

The process wasn’t quick. I iterated on it at least 15-20 times before I could get an integration that actually installed without errors, and an additional 5+ times to get the sensors in a condition that I wanted. In the end, however, I have a functional integration that scrapes the following data from my provider’s MyFuelPortal site:

  • Tank capacity
  • Gallons in tank
  • Last fill date (ISO format)
  • Tank % full
  • Last read date (ISO format) - this updates in the portal at least once per day, from what I can see

Integration config:

Integration installed:

Entities:

I’ll upload to github in case anyone wants to work on it. Some clear opportunities to improve this code include:

  • this integration is written with my propane provider hard-coded in. The login URL is https://MYPROVIDER.myfuelportal.com/Account/Login. A generalized integration would prompt for the user’s provider name/URL, presumably at the same time as the login info is requested.
  • the integration refreshes data every 12 hours. This is based on my assumption about how often the site data gets updated. This refresh period could be made configurable.
  • I set it up to accommodate multiple tanks, though they are not added to the integration automatically. This would likely need to be configured if the end user wants that functionality.

Link to repository

I’ve added a cumulative sensor to the integration and tweaked some other things. Everything is uploaded to the repository.

1 Like

Hey @DeltaNu1142 — thanks for building this integration! My propane provider also uses MyFuelPortal and I was looking for exactly this kind of thing to get tank data into HA’s Energy dashboard.

I got it working with my setup and it’s pulling in all 7 sensors nicely — gallons, level, capacity, delivery dates, daily usage, and cumulative usage. Really useful.

While setting it up, I noticed a few things that could be improved to make it easier for other MyFuelPortal users to adopt, so I went ahead and refactored it into a proper HACS-compatible integration. The main changes:

  • Configurable provider — the config flow now asks for the provider subdomain, so users don’t need to edit the source code
  • HACS install support — proper directory structure, hacs.json, translations, and an icon
  • Bug fixes — the cumulative usage sensor had an undefined variable reference, and the gallons sensor had the wrong state_class (was TOTAL_INCREASING but tank level decreases between fills)
  • HA best practices — CoordinatorEntity base class, device grouping per tank, proper units, state restoration for the cumulative sensor across restarts

I’ve opened a PR with all the changes: Refactor into HACS-compatible integration with configurable provider by floydpink · Pull Request #1 · DeltaNu1142/MyFuelPortal · GitHub

Happy to discuss any of the changes or adjust anything. Great work on the original — it was a solid foundation to build on!

You are a &%$@-ing all-star. I was hoping someone way more capable than I am would take notice of this and improve on it. I will check it out!

EDIT: I don’t know if you can tell by the github notifications, but this is the first time I’m attempting a merge into a repo that I initiated. Having some difficulties…

OK, merged changes, installed, performs awesome. This is what I wanted my integration to do from the beginning. Nicely done.

Thanks for merging it in, @DeltaNu1142 - and congratulations on your first PR merge!

Also, similar to what you did, I relied on a GenAI tool to do all the coding - but it was straightforward because your version was mostly there already.

Once again, thank you for creating this integration and socializing here.

Hey @DeltaNu1142 and @floydpink, thanks to both of you. This was a great base to build on, and Hari's HACS refactor made it really easy to extend. My provider uses MyFuelPortal too, and I went down a deep rabbit hole.

I've got a PR open with a big batch of additions:

New data

  • Delivery history + pricing: last delivery cost/gallons, derived $/gal and $/ft³, total spend, total delivered, plus an Average Daily Usage estimate from your fill history (steadier than the tank-level deltas, and populated immediately instead of waiting for the level to drop).
  • Account info: Customer Since, balance, and status, as a separate "account" device with the tanks nested under it.

Setup / UX

  • Vanity domains: setup now takes either the subdomain or a full URL, so providers that aren't on *.myfuelportal.com work (closes #2).
  • Configurable poll interval (1–48h), like you'd flagged.
  • Existing installs keep working with no reconfiguration.

Pricing

  • An Effective Price per Gallon that follows your actual delivered price, with a Manual Price per Gallon override for providers that don't publish cost, and a $/ft³ price entity you can drop straight into the Energy dashboard's gas cost.

Under the hood

  • I pulled the login + scraping out of the coordinator into a small, HA-free client module with unit tests over saved HTML fixtures. That's mostly what made everything above cheap and safe to add (each new page is one method), and it removed the duplicate login that lived in the config flow. Plus the usual hardening: daily-usage survives restarts, comma-safe parsing, and the delivery/account pages are best-effort so a portal change to one can't take the tank sensors down.

Verified end-to-end against my live provider; the derived price matched my actual delivered $/gal to the cent.

There's also a follow-up brewing: backfilling delivery history into long-term statistics (real spend/price-over-time graphs going back to your first delivery), plus an optional action that estimates historical consumption from fills so the Energy dashboard can show propane usage history too. I'll PR that separately once this one lands.

One bit of housekeeping: the repo doesn't have a LICENSE yet. @DeltaNu1142, would you be open to adding one (MIT/Apache)? Just makes forking and redistribution unambiguous for everyone building on it.

PR: #5

Thanks again, happy to adjust anything in review!

1 Like

Yes, though having never done it I may need some guidance. I’ll see what instruction I can find to get that done.

I’m pleased you’re getting some use from this and have expanded on it!

Thanks! Let me know if there is anything else I can help you with.

Regards,
J

I’ve just added a license to the repo. Let me know if that worked.

Awesome! I added a copyright statement to my readme changes, calling that out.

If my PR looks good to you, it is ready for you to merge.

Cheers!
J

Also, a callout that I will likely have another PR shortly that builds history statistics, since the current integration only gathers from the point it is set up.

It turns the delivery-history data into HA long-term statistics so it shows up in the Energy dashboard (consumption + estimated cost), with a service to backfill historical data per tank.

still working on it, but it is 90% there

Regards.
J

1 Like

@DeltaNu1142, above is done.

I've got a new PR up for you.

It pulls your delivery history into HA's long-term statistics, so you get real spend and price charts going back to your first delivery, plus an optional estimate so the Energy dashboard's Gas section can show historical usage and cost.

The reason I added this is that the live sensors only track forward from install, so they can't show past data. It's also a nice fallback if your propane company doesn't expose tank usage regularly; it runs automatically off delivery data alone and doesn't lean on the tank monitor feed. Even if /Tank comes back empty for a poll (or you never get good live usage), you still get spend/price history and can drive the Energy dashboard straight from deliveries.

Cheers!
J

1 Like