Mini-graph-card Setup

Hello,
I am rather new to Home Assistant. Until now I got everthing running, but the “mini-graph-card” just show me the middle-finger. I read, changed, saved, rebooted, again and again and …

Error:
grafik

My configuration:
grafik

/config/configuration.yaml
Screenshot 2022-02-14 at 18-04-05 File editor – Home Assistant

/config/ui-lovelace.yaml
Screenshot 2022-02-14 at 18-00-10 File editor – Home Assistant

HACS Frontend:
grafik

Dashboard Ressourcen:
grafik
grafik

What I do wrong?
Thanks
Peter

You have to type the following:

            - type: custom:mini-graph-card

to replace: “type: custom:‘mini-graph-card-bundle.js’”

In the configuration.yaml, you should have (if installed using Hacs):

  resources:
    - url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js
      type: module

Hello Didier,
thanks for answering me. In my question, I showed all the variantions I tried.
Your proposition was part of it. I changed the files according your Message and booted again.
No success.
You wrote “(if installed using Hacs):”
I opened the HACS Menu, which includes in Frontend the mini-graph-card, but nor in Integration or Frontend Lovelace.
I expect, that I installed Lovelace the way you described in an answer in:

Most of the time I work on HA when my wife is sleeping, so my brain is maybe near this state too.
What now?
Thanks, Peter

Hello,
Feedback: it is working. No corrections, but I had to boot several times to control optical arrangement at another page.
Thanks again
Peter

@browetd Is the resources: part in configuration.yaml really necessary now that home assistant auto-detects and lists the installed (via HACKS) resources in Configuration > Dashboards > Resources

I am a beginner and I am confused. I am asking about the the following chunk of yaml:

  resources:
    - url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js
      type: module

@Homa Can you share a working configuration for mini-graph-card that you have used. I too am having trouble with a custom configuration for mini-graph-card.

I am trying to modify and use the following chunk from its github repository:

- type: horizontal-stack
  cards:
    - type: custom:mini-graph-card
      entities:
        - sensor.humidity
      line_color: blue
      line_width: 8
      font_size: 75
    - type: custom:mini-graph-card
      entities:
        - sensor.illumination
      line_color: '#e74c3c'
      line_width: 8
      font_size: 75
    - type: custom:mini-graph-card
      entities:
        - sensor.temperature
      line_color: var(--accent-color)
      line_width: 8
      font_size: 75

@skepticAut0netic As far as I understand, you still have to add these lines associated with add-ons manually in configuration.yaml.

Here is an example:

      - type: vertical-stack
        cards:

        - type: "custom:mini-graph-card"
          name: Chauffage SDB Bas
          points_per_hour: 12
          hour24: true
          line_width: 2
          lower_bound: 0
          icon: mdi:radiator
          entities:
            - sensor.chauffage_salle_de_bain_bas_w

@browetd Thank you.

1 Like

Can you still confirm this?
I have tried two options in my configuration.yaml:

#resources:
#  - url: /local/mini-graph-card-bundle.js?v=0.11.0
#    type: module

resources:
    - url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js
      type: module

Above from: GitHub - kalkih/mini-graph-card: Minimalistic graph card for Home Assistant Lovelace UI and the second from this topic. But with both i got the message: Configuration invalid: Integration error: resources - Integration ‘resources’ not found. when i check the configuration.

After an fresh install from HACS and Mini-graph-card the file is stored in: \config\www\community\mini-graph-card\mini-graph-card-bundle.js

What you showed should be correct… That’s what I have in my configuration.yaml file

resources:
    - url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js
      type: module

Did you restart HA after installing mini-graph-card using HACS ?
What is the error message you have in the logfile ?

Yes i restarted HA. several times.
Do you have a specific log file for me to look at?
The main log file isn’t telling much. There is also not much done. I place the resource lines in configuration.yaml, do a check, to see the message from HA. At this point i block out the yaml lines, because en restart is not possible.

Look at the following logfile:

/config/home-assistant.log

And see if you have any error message related to mini-graph-card

In my opinion, your indentation is not correct in configuration.yaml, “resources:” should be indented versus “lovelace:”:

lovelace:

#
# Add-On for lovelace
#
  resources:
    - url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js
      type: module

Reminder: indentation is crucial in yaml files !!!

1 Like

The log file tells nothing about the mini-graph-card.

I missed something. I didn’t put “lovelace” in the yaml file. Now HA accepts the configuration.

Still it looks double to me. Because in Configuration > Dashboards > Recourses there is also a /hacsfiles/mini-graph-card/mini-graph-card-bundle.js line.

But still, even after a restart, the graph card is not working:

- type: custom:mini-graph-card
  entities:
    - sensor.jet_ochtruper_str_208_super_e10
  show:
    icon: false
    name: test
    state: false

[FIXED]

Trying and trying, looking at my other cards. This is how it should be:

type: 'custom:mini-graph-card'
entities:
  - sensor.jet_ochtruper_str_208_super_e10
show:
  icon: false
  name: test
  state: false

Completely different than the Github examples from Kalkih. :expressionless:

And with my Mini Graph Card working, i thought, why not block out the lines in configuration.yaml. So i did. Restarted HA. Edited a dashboard, still could create a new Mini Graph Card. Restarted it again. Cards are still working.

I really think the automatic add in: Configuration > Dashboards > Recourses is doing it’s job.

Is there a way to show the values above each of the bars? Rain events over a week period. I would like to the amount of rain above each rain Event.

I would like it to look like this:

Hello.
I have a graph for rain status (yes or no) and wind (number of beaufort), but I would like to add another sensor that says if it is cloudy, raining, sunny, etc.
The question is, can I add another sensor without showing its graph? The graph of 2 other sensors I would like to see them.
image

type: custom:mini-graph-card
name: Rain & Wind
hours_to_show: 48
align_state: center
icon: hass:weather-windy-variant
show:
  icon: true
  name: true
  state: true
  labels: false
  labels_secondary: false
  fill: fade
entities:
  - entity: binary_sensor.rain
    name: Rain
    show_legend: true
  - entity: sensor.wind_speed
    name: Wind
    show_state: true
    y_axis: secondary
    line_color: var(--accent-color)
color_thresholds:
  - value: 0
    color: '#006499'
  - value: 1
    color: '#009499'
  - value: 3
    color: '#009970'
  - value: 5
    color: '#009938'
  - value: 6
    color: '#009905'
  - value: 7
    color: '#2dff03'
state_map:
  - value: 'off'
    label: Clear
  - value: 'on'
    label: Raining
hour24: true
font_size: 70

Thank you, this was the solution for me.