Update 29.01.22:
The upper solution has one big disadvantage - you need to “hard-code” a width which may cause problems after a window resize.
The new solution is free of this problem:
Unfortunately, both 1st & 2nd methods do not allow to display a legend for all graphs; selecting a point of some graph is available for the topmost graph only.
Update 08.09.22:
There is one more method with card-mod - seems to be most advanced:
Here a value for "flex-grow: 1.2" must be set dependingly on a displayed 2nd value to place the state closer to the center.
This method is the only way to display a legend and see a state for some point!
Hi there,
I’m looking for an advise on how to change the color of the state based on the value. Here is my custom:mini-graph-card button, and I’m trying to achieve this:
if the download speed is less than 63 Mbit/s color RED, if is =< 70 color ORANGE and above 70 color green.
here is the code for the button, and I tried to play with the style option for ha-card .states.flex but that messes with the outcome of the card.
I prepared a thread dedicated to simplify & unify creation of graphs based on "mini-graph-card" & "history-graph". The thread is located here.
A small description is provided below.
Annotation:
The topic is dedicated to people who like the "mini-graph-card" and is going to keep using it.
The post describes using the "decluttering-card" to simplify creating & managing graphs based on the "mini-graph-card".
Intro:
While developing my HA setup very very soon a number of graphs in my system became about 10…20 - and it was just a beginning.
I wanted to have one style for all my graphs. Any time I wanted to correct something in "mini-graph-card" cards (common settings like styling, aggregate_func, "card-mod" styling etc), I had to repeat the same correction for every graph.
Also, I desperately needed a possibility to manage graphs - like changing "hours_to_show", switching on/off "show_points", "show_extrema" etc.
Finally, I needed two more features:
displaying a background graph like “Day / night”, “Available / unavailable” etc;
Is there any chance that fire-dom-event will ever be supported as a tap-action on this card?
I’m really missing it.
I use it to display the underlying entities of a graph which only shows the averageor the entities that are used in a template sensor which is being graphed. (I hope that makes sense)
I’m trying to create a card with a tertiary y axis: (y_axis: tertiary) does not seem to work. I have a Philips Hue outdoor motion sensor which detects Motion, Temperature and Light. I want all them in there but I can’t get the motion sensor with teh agregate max to work. each should have their own y axis. How can I do this. graph|690x429