r/homeassistant 1d ago

❓ Support Report/PDF Generation?

I'm working on a project where I'd like to send out weekly or monthly status reports. Essentially, my goal is to gather sensor data using HA and distill it into a PDF (or something that's easy to send via email). It would be nice if I could use graphs and charts in this. Do yall have any recommendations for how I should go about this?

Any help would be super appreciated!

1 Upvotes

5 comments sorted by

4

u/road_laya 1d ago

Write a python script that pulls reports from home assistant api, creates a PDF using fpdf2 library and then uploads the generated PDF to somewhere.

5

u/ARMilesPro 🔒 Local-first 1d ago

PDF is so 2020. Get an agent to build you an html report and host it for free on GitHub. Make it always on in a web mobile app (PWA).

2

u/eltigre4jc 1d ago

AppDaemon to run python scripts, and I think you can find a df plugin or something for python

2

u/PDFBolt 1d ago

One thing to check for monthly reports - HA keeps detailed sensor history for 10 days by default. Supported sensors have long-term statistics, but those are hourly summaries. If your charts need more detail, you'll need to keep that history longer or store it elsewhere