Request for help for power usage mini graphs

Moved question to it’s own topic as i didn’t realize i posted request in someone else’s. (new to this forum)

As i’m not good with code as it can quite easily overwhelm me, can someone help me setup template cards to look like picture below? It’s Norwegian “Tibber’s” power usage and price history that i can see in realtime pretty much, but i’d love for that to be shown as the same kind of graphs on HA as well.

To note beforehand, if all the cards are pretty identical code wise for seconds (live) graphs, minutes within an hour, hours, days, weeks, years and so on, and just change “seconds to minutes”, note that in the one code template if one template is all that’s needed to just copy paste and change variables. And if i find it easy to do the rest, i will finish the templates, and share the blueprints.
Do say 2 seconds worth of code for the graph, and i’ll copypaste that for the rest of the script, and if text size/spacings needs to be adjusted, note that as well in a commented note in it.

Unless the one who makes the blueprint does everything, and is all ready to use, that’d be super nice as well :smiley:

As i’d want 5 different cards, as history tab for power in HA is quite limited for sensors it can access for power draw, as the only one it can read is quite wrong for hourly readings, but cards can read from any sensors, so i want to setup 4 or 5 different cards for electricity readings

I’d want cards that can read per second of each minute, minutes per hour, hour of 1 day with power draw scale on left vertical, power cost entity on the right scale, and bars in the middle for current consumption with hours noted below each graph.
Doesn’t need every hour mentioned in the code, just an example “hour 00:00” and "hour:01:00, and i’ll write the rest from the template.

Same with days of the week, and weekly, monthly, and yearly basis. and if possible, a double graph one that shows 2 graph bars next to eachother per month to compare last year and current year with top middle stating orage being current year, grey was last year.

If it cannot do comparisons of years like this, then i can also do with a “decade” where it shows power usage for “2010’s, 2020’s” for example, but leave no graphs if X year wasn’t recorded.

this is the kind of graph i want for each of the cards. Orange shows price, blue is power used.