I would like to be able to plot e.g. rainfall this year compared to the long-term average. Or this month’s energy use vs some offline-calculated historical data. Currently there isn’t anywhere where I can put the e.g. 12 monthly rainfall numbers so that they could be plotted on a card.
As a workaround, I have abused custom template macros to give me such a data set within templates (e.g. for a sensor calculating today’s temperature vs the long-term average on this date), but there is no way to refer to it in the UI for visualisation.
I think this is typically done by making a template sensor, and storing your arbitrary dataset in an attribute of that sensor. You can put any data structure you want into an attribute (arrays, objects, etc)
But this is a waste of space isn’t it – it gets saved in the recorder multiple times for a static record. I was thinking something like an input_dictionary helper (maybe more helpfully called input_data) could be used.