UK Flo Gas integration

An integration to read gas tank level and remaining days of supply from the Flo Gas website account page. Flo Gas

[GitHub - videojedi/home-assistant-flogas](https://Github repo here)

2 Likes

̶J̶u̶s̶t̶ ̶g̶i̶v̶i̶n̶g̶ ̶t̶h̶i̶s̶ ̶a̶ ̶g̶o̶ ̶b̶u̶t̶ ̶g̶e̶t̶t̶i̶n̶g̶ ̶a̶n̶ ̶a̶u̶t̶h̶e̶n̶t̶i̶c̶a̶t̶i̶o̶n̶ ̶e̶r̶r̶o̶r̶.

Gave it an hour and now authenticates. Thank you Richard.

Looks like this is using an old API and the data it returns is incorrect. Maybe worth looking to see if Flogas have an updated API?

I've had this sitting on my system but it hasn't moved from 85%

using claude.ai ive amended the code and all seems to be working now;

  • Authentication — added proper browser headers (User-Agent, Referer, Origin) required by the Flogas portal
  • Login success check — config flow now correctly rejects bad credentials rather than always creating an entry
  • API endpoint — updated from /portal/bulk/data to /portal/overview/data-bulk
  • Response parsing — fixed to drill into response.data for tank values
  • Days remaining — calculated locally when API returns null, using remainingPercentage ÷ averageDailyUsage