kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.89k stars 233 forks source link

Issue with pulling attribute for Mini Graph #938

Closed chicknlil closed 1 year ago

chicknlil commented 1 year ago

I've got the following sensor:

image

In trying to setup a card for this, it doesn't seem to know how to respond to the attribute provided (but perhaps I'm supplying it wrong?):

type: custom:mini-graph-card
entities: 
  -  entity: sensor.waqi_east_hartford_connecticut_usa
     attribute: Pm 10
     name: pm 10
     show_state: true
color_thresholds:
  - value: 0
    color: "#2ead8c"
  - value: 51
    color: "#ede066"
  - value: 101
    color: "#edad66"
  - value: 151
    color: "#c73a66"
  - value: 201
    color: "#7a3ab3"
  - value: 301
    color: "#8b395a"
hours_to_show: 168
show:
  icon: false

That makes this: image

Ideally, what I'm looking to do is have one (or several if necessary) cards that tells me what the "Dominentpol" is and displays it (at the moment, it's PM 25), as well as the Pm 10 and Pm 2 5, all of which are attributes.

Am I doing this wrong?

ildar170975 commented 1 year ago

You are using a wrong definition for the “attribute” option.

chicknlil commented 1 year ago

Actually, I was using the wrong attribute, which I figured out by looking in developer tools -> states. Thus why I closed this. No additional comments needed. Problem has been solved.

ildar170975 commented 1 year ago

The reason is not only in “using wrong attribute”. This definition is just wrong: “attribute: Pm 10”. This could be an attribute’s name displayed in more-info - but not a real attribute’s name.

chicknlil commented 1 year ago

Not sure why you're trying to be argumentative on a topic I closed because it was solved but the actual attribute was pm_10, as opposed to Pm 10, as referenced in the image. It didn't occur to me that it might be different. But again, not sure why you're being so aggressive. The problem is solved.

ildar170975 commented 1 year ago

You completely misunderstood me, no aggression at all. I just pointed at your mistake in your 1st post - as a matter of assistance, nothing else And instead of saying “thank you” you are trying to raise your voice, not cool.

chicknlil commented 1 year ago

You didn't contribute to the discussion in any meaningful way, why would I thank you? The problem was solved long before you commented, and your comment wasn't even applicable. You continue to trying to make a mountain out of a molehill instead of just letting it go. For the love of all things good and holy, please STOP.

ildar170975 commented 1 year ago

No, you are hopeless.