Lovelace: mini graph card

perfect - thanks heaps for your help on that one!

I’m going to give up on having it show me the state of the switch I think…

currently trying this:

entities:

      - sensor.kitchen

      - entity: switch.kitchen_zone

        show_state: true

but it shows me, where I’d ideally like to add the air-conditioner MDI icon and have it change state depending on switch status

image

You need to setup the state_map option, see this example from the docs.

There’s a icon option if you want to override the icon.

thanks mate - I was hoping to be able to incorporate the state into the icon, rather than the graph… not sure I can do that?

Is there anyway to define a global, default for color_thresholds?

Do you want the icon to dynamically change based on the state?
If so, you can utilize config-template-card.

No, but you could move the state_map code into its own file and use !include on the places where you want it I guess.

2 Likes

Whaaaaat!!! Really???

I didn’t know that, cool!

Does it work for threshold aswell?

I probably missed something but just writing:
color_thresholds: !include config/color_thresholds.yaml
don’t work, it won’t even let me save.

You should be able to !include pretty much anything & anywhere, pretty useful! :smiley:

Could be that it only works if you’re in lovelace yaml mode :slightly_frowning_face:

# ui-locelace.yaml
...card config
color_thresholds: !include ui/thresholds.yaml
# ui/thresholds.yaml
- value: 0
  color: "#CCE5FF"
- value: 10    
  color: "#66B2FF"
- value: 18
  color: "#0080FF"
- value: 20
  color: "#87c087"
- value: 21
  color: "#389638"
- value: 22
  color: "#FF9932"
- value: 23
  color: "#FF8000"
- value: 24
  color: "#ff0000"
3 Likes

Hi all,
I’m quite new to HA and Lovelace cards.
I’m playing arround with the mini-graph-card, i was wondering if there is a way to adjust for example the upper_bound value through an input_number entity? so it can be adjusted dynamically?

Is this possible? I’ve been googling, but what i found didn’t work for this card.

edit: Never mind :wink: I modded the card to my needs ;). So it works now! Great card btw!

Hi and first thanks for very good graph card.

I try to mod my graph card and now have only one problem, can you or someone help me with that.

I have this kind of graph. Try to get left numbers show scale on whole picture, now i think that gives scale on first peak measurement (0.02kwh and 47.7kwh) and i want get whole graph scale left or right side graph to give my information what is most peaked value on that weekly graph.

Just want whole scale values left or right side graph. Example this picture scale down is 0.02 and scale high is 52.05kwh. Hope someone can help how i get them there. That values need to be showing all time, not hoovering mouse or something.
screenshot_diagram

edit: How i get own color_threshold values that other graph. Now both graphs use same threshold values.

edit2: If that not possible can i keep that upper graph with threshold colors and get that down graph example only blue, i try give line_color: blue to down entitie, but i think that treshhold values now overdrive that.

edit3: Is that possible to get show both graph names on that view alltime. Now that only show name of that first entitie.

This is great news! I am so happy that your hard work has been noticed and used to improve HA!

7 Likes

But it still does not have nearly as much customizations as we have in the mini graph card.

True, but it still an achievement for @kalkih I would say :slight_smile:

1 Like

ofcourse :slight_smile:

I am using this graph card to monitor daily energy usage. So I am using the group_by: date option. I am using extrema as well. Is there currently a way to change the extrema text so it shows the max and min day instead of the max and min data point time? Even adjusting the format to just show the day without the time would be useful.

No, not currently, actually started working on that issue a while back but never finished, can hopefully get it done in the future, or if anyone else wanna give it a shot here’s the changes I got so far.

EDIT: Nevermind, removed the cache solved the issue. :laughing:

Hi guys,

Since the latest update; 0.106.0 some of my mini graph cards are broken like this:
Removing the color_tresholds solves the issue… anyone knows how to fix this? I’m using version v0.9.3 of the mini graph card.

image

Not sure if it might be related to this.

how did you remove the cache please? I have the same problem

1 Like