Lovelace: mini graph card

how do you connect grafana with the local hassio db then?

This is not the place to ask.

1 Like

Thank you for your help…

I’ve tried installing this card but getting an error that I can’t work out.
Installed using HACS.
Installed to;

/local/community/mini-graph-card

Here’s the top of my ui-lovelace file that shows other working resources including the non working mini-graph-card

resources:
  - url: /local/community/lovelace-slider-entity-row/slider-entity-row.js
    type: module
  - url: /local/community/media-player-mini/mini-media-player-bundle.js
    type: module   
  - url: /local/community/mini-graph-card/mini-graph-card-bundle.js?v=0.9.3
    type: module
  - url: /local/custom_cards/icloud3-event-log-card.js?v=1.000
    type: js

Here is where I am trying to create a quick test card;

      - type: custom:mini-graph-card
        entity: sensor.rumba_memory_usage

and here is the resulting error in the card on the dashboard;

Cannot read property 'length' of undefined
type: 'custom:mini-graph-card'
entity: sensor.rumba_memory_usage

Any help would be appreciated.
Thank you!

if you install using hacs no need to add the recources manually anymore, they are done automatically in config > lovelace ui > recources

trie to remove those recources in your ui file and restart your server and make the entity card again (make a manual card with this:

type: custom:mini-graph-card
entity: sensor.rumba_memory_usage

so no ‘-’

you can also trie this in th manual card:
comes in handy if you want more entities in 1 graph card

entities:
  - entity: sensor.rumba_memory_usage
type: 'custom:mini-graph-card'

Thanks for the help, but sadly none of that has worked for me.
If I remove the resources from the top of my UI file, then it breaks all my custom cards that I have working.

  • I can however see them all as well in config > lovelace ui > recources

I tried changing the card as well, and still no luck.
I did consider whether it was something to do with changing over to hacsfiles from community, but i tried all combinations of that as well, and still it made no difference.

are you on the latest stable build of hassio and hacs?

Hi something i forgot to mention
in order to let this work install following hac plugins
card-tools

This is a collection of tools to simplify creating custom cards for Home Assistant
If you see “Can’t find card-tools. […]” in your Home Assistant UI, this is what you want.

please install this and remove the recources in you ui yaml file and let me know if you still have the cant find the custom …

Thanks again.

I have now installed the card-tools plugin.
Sadly if I remove the resources from my UI file, it still breaks all the links to everything else.

The error I am now receiving on the mini-graph-card is;

Cannot read property ‘length’ of undefined
type: ‘custom:mini-graph-card’ entity: sensor.rumba_memory_usage

Also, yes, on latest release for everything, however my HACS folder is all still based on community and not hacsfiles.

1 Like

from my opnion i would reinstal hacs following the install procedure on their website.
in that mather all links will be correct and functioning
hacs has to be installed in the “custom_components” folder

in www/community the differents plugins wil be installed because they should be accesible throught /local/community (symbolic auto link)

when you install a plugin the recource will auto be addded in config > lovelance > recources
card tools will allow the lovelace UI to open through ‘hacfiles’

i think your base problem is the incorrect installation of hacs

to be clear you acces tour lovelace UI file by:
go to a dashboard > three dots upper right corner > edit > three dots upper right corner > raw
???

i have no recources listed there
everything goes by the recources from config > lovelace > recources (automatic if you install a plugin from hacs and added afterwarths to lovelace ==> after installation there willl be a pop up on the plugin screen that says add to lovelace, thats making the symbolic link)
card tools delivers me the ‘hacfiles’ to lovelace link ==> so all my plugins work because of that without the mentioning of recources in my ui file

This card doesn’t depend on card-tools.

From reading the error, it’s most likely because you didn’t provide a valid card config, entity is not a valid root option, entities should be provided as a list, try the following instead:

type: custom:mini-graph-card
entities:
  - entity: sensor.rumba_memory_usage
1 Like

Thanks all. I seemingly have it working now. I reinstalled to double check the installation as well as changed the card configuration.

Thank you!

Like i mentionned

Type doesnt have to be the first Line
Last Line works evenly well

I have the very same problem! Did you ever find a solution?

That can happen when there’s no history data available for the entity in HA.
Make sure you’ve set up history & recorder correctly and it’s working as intended, make sure that the entity isn’t excluded from the recorder.
You can try with the default history-graph card, it should also not display the graph if the above is the case.

Hey @kalkih, thank you for your answer - it works perfectly fine with the default card.
I could locate the problem in the meantime. My card-config includes the following:

update_interval: 300

when I remove it, the graph loads instantly.

When a graph has negative numbers, is it possible for the fill to be towards the Y zero axis. For example, in the screen shot below you can see the fill is to the lowest Y axis point -2546.34, where as it would be nicer in this use case to fill to the y axis. Screenshot 2020-05-12 at 09.56.25

Can the size of the extrema font be changed independently of the state font?