Home Assistant Community

Lovelace: mini graph card

#392

I think he is using this:

1 Like

#393

Can you please send me the code?

0 Likes

#394

Sorry, what code are you referring to?
@maurizio53 did share the code here:

0 Likes

#395

Still not working when I do that.

0 Likes

#396

Ok turns out even though tracker card said it was updated it want actually. I manually downloaded to get it working.

To clarify. If I am using tracker card do I still need to add the reference in the raw config editor?

0 Likes

#397
0 Likes

#398

Quick question regarding this instruction:
“ 1. Add a reference to mini-graph-card-bundle.js inside your ui-lovelace.yaml

Do I have to make/use ui-lovelace.yaml or can I just add the reference to the top of the storage mode config using the raw config editor?

0 Likes

#399

Yes just add resources in the raw editor…

0 Likes

#400

Yes. I have access to file

0 Likes

#401

If you are using custom_updater do this:

Replace ?v=0.3.0
With:?track=true

Change /local/
With /customcards/

If you’re not using custom_updater remove the ?v=0.3.

Let me know :slight_smile:

0 Likes

#402

Sorry if this has been answered already, but is it possible to make the bar graph display absolute values rather than averaged values?

Case in point: I have a sensor that updates once a day with the previous day’s electricity usage. I would like a bar graph display of all of the last, say, 2 weeks worth of values with a single bar for each day. So I set my hours_to_include to 2 weeks and my values_per_hour to 1/24.

The problem is that the graph is dependent on the time it is viewed - if I view it at 10am, each bar will represent the average value from 10am to 10am on sequential days - so if on Tuesday it was 6, and on Wednesday it was 4, the bar will cover both Tuesday and Wednesday and display 5.

I could use a line graph - but I don’t want to :slight_smile:

Any ideas how to circumvent this problem?

0 Likes

#403

Sorry - I’ve just seen this, which relates to my question above. Has this been implemented or is it still in the works?

0 Likes

#404

Hey, I’m still playing around with it, the timestamps would get messed up so have to fix that.

I don’t see how that would be useful for your use case though.

Here’s an answer to a similar question as yours, there’s more info if you scroll through the thread.

0 Likes

#405

Thanks. I’m not use custom_updater. I remove ?v=0.3.0 and not work

0 Likes

#406

Can you try to use this code instead?

type: custom:mini-graph-card
entities:
  entity: sensor.temperature
  name: Temperature
0 Likes

#407

That’s fine, I’ve got it looking nice with the line graph instead :slight_smile:

Would it be possible to include a show: option to include or exclude dates from data points? As mentioned I have my graph charting data use through the week - it would be handy to see dates for each peak and trough

0 Likes

#408

Yes, this will be the visible by default in the next release when the hours_to_show option is set to higher than 24 hours.

2 Likes

#409

That’s fantastic, many thanks!

1 Like

#410

I found the error.
I was putting the code in ui-lovalace.yaml and it did not work. Now I put it Raw config editor.

Thanks
What I do not know now is in what file is saved the configuration that I write.

0 Likes

#411

It hould be stored in the storage folder somewhere but you will need to keep using the UI.

Were you using yaml mode for lovelace?
If no, that might have been your original problem

0 Likes