Best way to export history graphs?

I’d like to send history graphs (temperature etc.) as an image via telegram API. What is the best way to create such an image? Do I really have to extract the data via SQL myself (as described here: https://www.home-assistant.io/blog/2016/07/19/visualizing-your-iot-data/ ) and push it through gnuplot?

Or is there a simpler way to tell for example the history graph component to store the output somewhere?

3 Likes