Displaying Data Metrics from MySQL in Lovelace?

There’s some life information that I’d like to display in Lovelace, but I’m not sure how to do it.

My HA instance records everything to MySQL, but there’s often very little utility to displaying some of the data the HA records.

Then, there’s some data that I’d really LIKE to have displayed for which there are no integrations in HA. One of those is banking information. Account charges, balances, etc., would be nice to have as a tab in HA.

I use GNUCash to manage finances, which is NOT an automated program, but, nonetheless, it is accurate, and it is stored in MySQL.

Is it possible to Query MySQL and create sensors with values based upon those queries through HA, or would it just make sense to use some other sort of dashboard system to display this information? It doesn’t necessarily need to be in Lovelace. I could run a separate Pi4 with a display to show the information if I knew the application or dashboard system to use.

Thanks!

Wow, this is the only useful search result on the web in 2023 combining “home assistant” and “gnucash” as search terms…

I am also interested in having my GnuCash information shown (and potentially trigger automations on specific values, etc.). And I would love to go further and have Home Assistant be the UI to enter new transactions. This would also enable my wife to use GnuCash for household budgeting.

Have you had success so far with your approach?

Unfortunately, no. We abandoned GNU cash the first time the DB corrupted and switched to YNAB. I’d rather have “so so” than potentially catastrophic.

I’m using GNUcash for 20 years and never had data loss.

I use files though. And at least long time ago they said MySQL is experimental.

With files, GNUcash creates locks and backups for every session. Works rock solid for me for decades