Lovelace: mini graph card

The beta isn’t working for any of my configurations, all graphs are blank. Went from 1 graph not working to all graphs not working.

The fix for the storage quota issue didn’t make it into the beta release, can probably do a new release today.

Ah ok, I can live with the issue for a while so no rush.

1 Like

@petro

v0.4.3-beta2

Another beta release, make sure to clear cache if you have issues loading the new version

CHANGED

  • Redesign of line point hover (#99)

  • Moved to localForage for caching (#96) - (@bramkragten)

FIXED

  • Interpolate color for out of bound thresholds (#91)

  • Error when localStorage quota was exceeded (#95, #97)

2 Likes

So far, it appears to fix the issue. I’ll keep you posted. The whole page loads much faster now as well.

2 Likes

Great!
Yeah we should now be able to cache a lot more history data after changing to indexedDB as storage, thanks @Bram_Kragten!

Edit: What’s up with your humidity graph btw? the line color / fill doesn’t match, could be a bug, mind sending me the config?

1 Like

Sure, never really noticed it to be honest. It uses anchors

anchors


  # Main rounded border style

  mainstyle: &mainstyle
    type: 'custom:card-modder'
    style:
      border-radius: 20px

  # Entities heading

  entities_card_no_headers: &entities_card_no_headers
    type: entities
    show_header_toggle: off

  # Basic transparent style meant for vertical-stack-in-card

  transparent_background: &transparent_background
    type: 'custom:card-modder'
    style:
      --ha-card-background: "rgba(0, 0, 0, 0.0)"
      --ha-card-box-shadow: 'none'


  # Rounded transparent style ment for vertical-stack-in-card

  bordered_inset_style: &bordered_inset_style
    type: 'custom:card-modder'
    style:
      --ha-card-background: "rgba(0, 0, 0, 0.0)"
      --ha-card-box-shadow: 'none'
      border-radius: 5px
      margin: 5px

  # Temperature colors and levels.

  mg_inside_temperature: &mg_inside_temperature
    type: custom:mini-graph-card
    hours_to_show: 24
    points_per_hour: 1
    line_width: 2
    show:
      #extrema: true
      fill: true
    color_thresholds:
      - value: 65
        color: "#3498db"
      - value: 70
        color: "#f39c12"
      - value: 75
        color: "#E45E65"

  # Humidity colors & levels

  mg_humidity: &mg_humidity
    type: custom:mini-graph-card
    hours_to_show: 24
    points_per_hour: 1
    show:
      #extrema: true
      fill: true
    color_thresholds:
      - value: 30
        color: "#3498db"
      - value: 60
        color: "#f39c12"
      - value: 80
        color: "#E45E65"

  # basic graph, not sure what to name it

  mg_basic: &mg_basic
    type: custom:mini-graph-card
    hours_to_show: 24
    points_per_hour: 1
    show:
      fill: true

full card

      - id: multisensor_1
        <<: *mainstyle
        card:
          <<: *entities_card_no_headers
          entities:
            - type: section
              label: Master Bathroom Aeotec Multisensor 6
            - type: custom:vertical-stack-in-card
              cards:
                - type: horizontal-stack
                  cards:
                    - <<: *transparent_background
                      card:
                        type: picture
                        image: /local/images/devices/aeotec_multisensor6_2.png
                    - <<: *bordered_inset_style
                      card:
                        <<: *mg_inside_temperature
                        entities: 
                          - sensor.ms_temperature
                        name: Temperature
                - type: horizontal-stack
                  cards:
                    - <<: *bordered_inset_style
                      card:
                        <<: *mg_humidity
                        entities: 
                          - sensor.ms_humidity
                        name: Humidity
                    - <<: *bordered_inset_style
                      card:
                        <<: *mg_basic
                        entities: 
                          - sensor.ms_luminance
                        name: Luminance
3 Likes

looks amazing !, would you mind share the code for the all page?

looks amazing !, would you mind share the full code in github If you have one.

@yoni3210 @Abeksis I’m working towards getting my config up on github as we speak. I am very close to having it posted. I will update you when it’s up. As always, it’s a moving target. I’ll probably post it monday because I can never meet my goals.

1 Like

Thanks! The new caching has fixed my issues with graphs not displaying, although seems a bit less responsive now on some of the graphs with more data? That might be the hover action though.

The new hover action is great though, would it be possible to expand this to show only the one line when hovering over an entry in the legend?

1 Like

Thanks @kalkih

new beta fixed my issue with empty graphs.

Everything seems working well now!

1 Like

Hmm, shouldn’t affect performance noticeable overall, but it will of course be a bit more demanding on the browser than before when you hover / un-hover points.

About the legend, absolutely, great idea.

Hi everybody! I’m new here, as wells as to HassIO, so please excuse me if I ask something obvious!..
This card looks awesome and seems exactly what I need. However I still can’t figure out how to install it - the instructions on github says first to get into config/www folder, but where to find it and how to get into it?! Any advise is very much appreciated, thanks a lot in advance

Search for the highlighted words “latest release” and you will find the file to download it and place into the proper folder.
Then follow the rest of the instruction to have it work.

Hey!
Maybe these instructions can be of help, mixed with the instructions on GitHub

Or perhaps this guide

In regards to the location of the configuration folder, check this docs/configuration.

Let me know if you have any further questions.

Hi @kalkih! Thanks a lot, the reddit instruction about Google calendar pointed the way for me, the keywords were

you should see a folder called /www/ , if not create it

So I’ve created the config/www folder, downloaded the mini-graph-card-bundle.js file. The same reddit guide pointed that since I don’t have the ui-lovelace.yaml file I have to use the raw config editor - so I pasted the three resources lines from github instructions there, on top. Restarted Home Assistant, and… nothing!! Please help, what should I do next to use the card?
Thank you very much in advance

2 Likes

Hi,

The percentage for some strange reason not centered

,
any idea why ?

Config:

      - type: custom:mini-graph-card
        name: HD
        labels: true
        align_state: center
        icon: mdi:harddisk
        show:
          extrema: true
          label: true
          points: true
        entities:
          - entity: sensor.disk_use_percent_home
            name: Disk Usage
            line_color: '#6d19b2'
          - entity: sensor.home_assistant_v2_db
            name: Database Size
            line_color: '#0899ce'                 
            hours_to_show: 24
            points_per_hour: 1
      - type: custom:mini-graph-card
        name: Pi-Hole
        labels: true
        align_state: center
        icon: mdi:pihole
        entities:
          - entity: sensor.pi_hole_ads_blocked_today
            name: Ads Blocked Today
          - entity: sensor.pi_hole_dns_queries_today
            name: Dns Queries Today
          - entity: sensor.pi_hole_dns_unique_clients
            name: Dns unique clients

It works!! It was a small typo in the url! Thank you everybody for help!

1 Like

Yeah, I think I know what the issue is, nothing you can do about it, will fix in the next release.

1 Like