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
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.
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
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…
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.