"mini-graph-card" & "history-graph": using a decluttering template

How to show only extrema and/or average values:

It is rather convenient to see extrema and/or average values right in the graph:
image

But sometimes it is required to have 2 or more graphs on the card - in this case displaying extrema/average values is possible for only one sensor, which is confusing.
By using this template it is possible to display extrema/average values on a separate card, so you may display a mini-graph-card with 3 graphs and 3 small cards below stacked vertically:
image
Here is a code:

      type: custom:decluttering-card
      template: decl_graph_tmpl
      variables:
        - tmpl_VALUE_TITLE: ... some title ...
        - tmpl_INPUT_HOURS_TO_SHOW: ...
        - tmpl_INPUT_SHOW_EXTREMA: input_boolean.service_true_value
        - tmpl_INPUT_SHOW_AVERAGE: input_boolean.service_true_value
        - tmpl_VALUE_GRAPH_TYPE: false
        - tmpl_INPUT_REALTIME: ...
        - tmpl_VALUE_COMPACT_MIN_MAX_AVG_INFO: ... true or false ...
        ##############################################################
        - tmpl_SENSOR: ... some sensor...
        - tmpl_VALUE_NAME: ''
        - tmpl_VALUE_SHOW_STATE: false

The tmpl_VALUE_COMPACT_MIN_MAX_AVG_INFO variable is used to make fonts for extrema/average values smaller. Surely it may be used in a “usual graphs” (i.e. graphs with a curve & extrema/average values).
A small example: I needed these graphs to be stacked horizontally, so I applied this “small font” style.
image

reserved post

1 Like

reserved post

Can you show me an example of code without the decluttering template?

These examples you can find in the mini-graph-card community thread.
The whole idea of using decluttering templates was to simplify building graphs.

1 Like

Looked there, but I did not find an example, if suddenly, you have a link, please share, while I look at the whole topic again.

What do you want to achieve exactly?

Also, why do you need a “pure mini-graph-code” w/o templates? If you need it for learning purpose, probably it will be very useful to read the template’s code since it contains lots of features.
If it is difficult for you, then I will try to prepare these examples. Depends on what you need.

Spent some time, created additional sensors and I did what I wanted. Thanks so much for the idea, and the help.