Lovelace: mini graph card

Please will you share the code you used to get your public IP address? I am trying to use the dnsip sensor, but it’s not working…

Yes, here it is, it works for me although my comment seems to show that it had a name change at some point.

  # Public IP address
  - platform: dnsip      # sensor.myip
    name: Public IP Address

And my Lovelace:

      - type: entities
        title: '-- Network --'
        show_header_toggle: false
        entities:
        - entity: sensor.public_ip_address
          icon: mdi:ip-network

Ok thanks… but actually i have problems connecting with myip.opendns.com from my browser. It always gives me error…

Would this work for a binary sensor which has a state of either wet or dry? I’d like to show a graph of when my lawn zones were watered.

No not directly, but you can always create a template sensor of the binary_sensor and use that template sensor in this card.
It probably won’t end up looking as what you might expect since the graph does display the history as the moving average.

I recommend using the default history-graph for binary sensors, I personally think it presents binary sensor history really well!

1 Like

Hi Home Assistant Allies

Does anyone know if it is possible to use prediction data. I have for example 5 sensors that indicate the expectation change of rain per day. So, i don’t need the history only the 5 sensors in a graph. I know there is something like dutch-precipitation-forecast-based-on-buienradar-nl
But i prefer to use the mini graph card for the same look, feel and flexibility :slight_smile:

This are the simple entities that i have now, seems to be some rainy days in the Netherlands :wink:

Regards Niels alias MISEV

I don’t think so, unless you manage to add those sensor states as history entries and somehow manipulate their timestamps to be in the past by x amount of days.

New release v0.4.0

This version brings many improvements to how sensor history is fetched and handled, this should result in much quicker loading of the graph.

These improvements should also reduce stress on the HA backend, since the card now cache history data locally in the browser and only request data it’s missing.

Thanks @Bram_Kragten for the contributions!

CHANGELOG

ADDED

  • Local caching of history data (#88) - (@bramkragten)

  • New update_interval option, set a custom update interval of history data, instead of on every state change (#88) - (@bramkragten)

CHANGED

  • Now only fetching new history since last update, instead of all history every time (#88) - (@bramkragten)

FIXED

  • Jitter when hovering over points in particular configs (#87)
3 Likes

Last update broke line color thresholds unfortunately, so here’s another release with thresholds working again + some changes (improvements imo) to color threshold appearance.

CHANGELOG - v0.4.1

CHANGED

  • Changed/improved appearance of color thresholds

  • Color thresholds are now rendered vertically instead of horizontally (#90)

FIXED

  • Broken line color thresholds

Hi @kalkih,
I was wondering if it was possible for you to have, for all your plugins, the js file also in the github repo rather then only in the releases.
This because I have a script that downloads the componetns and the cards automatically from github to update my master repository, and for those that are only available in release, i have to manually update the script everytime (due to the fact that there is no /latest/ option).

Is that possible or it messes up your deply procedures?

Thanks
Andrea

I use this and it works fine…

https://raw.githubusercontent.com/kalkih/mini-graph-card/master/tracker.json

You mean with the tracker card and the updater component?
I do use that too but I got a “master” repository where I work my config and includes all the custom cards and components, and everytime it overwrite the HA config folder (overwriting everything).

Do you grep the URL from that file? That might be an idea indeed :slight_smile:

Yes, sorry, I prefer not having the dist in the git repo, but as petro said, tracker.json always provides a direct download link of the latest release. Or if you want to clone the repo and build from source that would also be an alternative, although does requires npm & nodejs.

Hi Kalkih,

Thanks for your answer. Sounds intresting to manipulate the data :grin:
Maybe i’ll give it a try in the future.

Greetz Misev

Since 0.4.1 none of my graph cards show. I don’t think I have changed anything :wink:
What could be the problem?
(It must be me but I think I’ve thought of everything - except obviously I haven’t…)

custom_updater:
  track:
    - components
    - cards
    - python_scripts
  component_urls:
    - https://raw.githubusercontent.com/pnbruckner/homeassistant-config/master/custom_components.json
  card_urls:
    - https://raw.githubusercontent.com/kalkih/mini-media-player/master/tracker.json
    - https://raw.githubusercontent.com/kalkih/mini-graph-card/master/tracker.json
resources:
  - url: /customcards/github/thomasloven/auto-entities.js?track=true
    type: js
  - url: /customcards/github/thomasloven/browser-commander.js?track=true
    type: js

and a load more including…

  - url: /customcards/lovelace_cards/mini-graph-card-bundle.js?track=true
    type: module
  - url: /customcards/lovelace_cards/mini-media-player-bundle.js?track=true
    type: module

image

title: Test View
cards:

  - type: entities
    title: Test
    show_header_toggle: false
    entities:
      - entity: sensor.speedtest_download
        name: Download
      - entity: sensor.speedtest_upload
        name: Upload
      - entity: sensor.speedtest_ping
        name: Ping
    
  - type: custom:mini-graph-card
    entities:
      - entity: sensor.speedtest_download
        name: Download
        color: green
      - entity: sensor.speedtest_upload
        name: Upload
        color: red
      - entity: sensor.speedtest_ping
        name: Ping
        color: yellow

Gives me… (i.e. no graph. None of mine work, this is just a really simple config as an example)

Hey, please check the browser dev console and post the errors you get.

I’m not getting any!

I cleared it and then clicked around the tabs with graphs doing refreshes as I went and there are no errors in my log after using the REFRESH button.
image

I reinstated everything else on my test view with the graph card and it is trying to display something because I have this small gap…
image

Hey, thanks but I meant the browser dev console, would be great if you could check that as well.
Thanks!

Ah, yes, sorry. :blush:

Thank you,
I think something went wrong when deploying the last release, seems to have published a dev build. Re-downloading the file should fix this, you might need to clear cache as well.

Anyway, there’s now also a new release which should fix various issues related to color_thresholds, v0.4.2.

Let me know if that solves the issue.