Lovelace: mini graph card

Any solutions to this?

It’s an esphome issue not an issue with this card so I hope you logged the issue in esphome?

@DavidFW1960 are you suggesting the NaN issue showing up on lovelace (even when latest values are non NaN or non ZERO) is an ESPHome issue and not a card issue?

I would have thought not being able to discard/ignore the one NaN (seen over the last 24hrs) would be a card issue.

Cheers,
Trevor

Ah
 if the entity isn’t NaN and the card isn’t showing the current entity value it would be the card. I don’t see NaN on any of mine - but I don’t use esphome.

No, there’s a feature request open over at github for the feature though.

The format of the state is most likely reported in a number format not supported/correctly parsed by the card which could result in NaN (not a number) as the output,
I’ve answered you over at github, let’s continue the discussion there.

I have downloaded the source code a month ago and compiled mini-graph-card-bundle.js v0.9.4. The aggregate func delta works fine. But now I don’t see anything regarding delta and 0.9.4. I have no idea why this was removed.

Thank you for the reply, no worries. Great card though. :+1:t2:

1 Like

It wasn’t removed, it’s currently only available in the dev branch though, I should really do a new release
 maybe tonight or tomorrow.

1 Like

Juhu. Soft upper and lower bounds will be great to have :slight_smile:

Is there anyway to show the event time on the horizontal axis?

No, but planning on adding that soon.

2 Likes

I actually like the simplify of the graph without axes. Great for a quick glance at a trend.

Where a full featured Graph is required I use Grafana.

Yes, same here and the original design and idea was to keep the graph very minimalistic and light on information. It’s also why I decided to build the graph lib from the ground up.

The feature request has been quite popular though which made me reconsider the idea.
It’ll of course be optional.

2 Likes

Hi all,
I am kinda new to this Home Assistant thing, but I really enjoy configuring it until I ran into this annoying issue I am having.
So I want 1 lovelace card with a sensor in the top, and then 2x2 graphs below it. Something like this:
image
However, this is what I can get:


This is what I got so far:

entities:
  - entity: sensor.bloomhole_seen_clients
    icon: 'mdi:devices'
    name: Numer of Clients
  - align_state: left
    entities:
      - color: '#19D541'
        entity: sensor.bloomhole_dns_queries_today
        name: Total Queries
    font_size: 75
    font_size_header: 22
    hour24: true
    line_width: 3
    points_per_hour: 2
    icon: 'mdi:earth'
    show:
      icon: true
      points: false
    style: |
      ha-card {
        border-radius: 12px;
        background-image: none;
        box-shadow: none;
        background-color: rgba(114, 123, 140, 0.1);
        font-weight: bold;
       }
    type: 'custom:mini-graph-card'
  - align_state: left
    entities:
      - color: '#20BEE5'
        entity: sensor.bloomhole_ads_blocked_today
        name: Ads Blocked
    font_size: 75
    font_size_header: 22
    hour24: true
    line_width: 3
    points_per_hour: 2
    icon: 'mdi:hand-right'
    show:
      icon: true
      points: false
    style: |
      ha-card {
        border-radius: 12px;
        background-image: none;
        box-shadow: none;
        background-color: rgba(114, 123, 140, 0.1);
        font-weight: bold;
       }
    type: 'custom:mini-graph-card'
  - align_state: left
    entities:
      - color: '#EEA527'
        entity: sensor.bloomhole_ads_percentage_blocked_today
        name: Percent Blocked
    font_size: 75
    font_size_header: 22
    hour24: true
    line_width: 3
    points_per_hour: 2
    icon: 'mdi:chart-pie'
    show:
      icon: true
      points: false
    style: |
      ha-card {
        border-radius: 12px;
        background-image: none;
        box-shadow: none;
        background-color: rgba(114, 123, 140, 0.1);
        font-weight: bold;
       }
    type: 'custom:mini-graph-card'
  - align_state: left
    entities:
      - color: '#DC3F1C'
        entity: sensor.bloomhole_domains_blocked
        name: Domains on Blocklist
    font_size: 75
    font_size_header: 22
    hour24: true
    line_width: 3
    points_per_hour: 2
    icon: 'mdi:format-list-bulleted'
    show:
      icon: true
      points: false
    style: |
      ha-card {
        border-radius: 12px;
        background-image: none;
        box-shadow: none;
        background-color: rgba(114, 123, 140, 0.1);
        font-weight: bold;
       }
    type: 'custom:mini-graph-card'
show_header_toggle: false
title: PiHole
type: entities

When I try to change this to what I want, it gives an error:

This is what I try:

entities:
  - entity: sensor.bloomhole_seen_clients
    icon: 'mdi:devices'
    name: Numer of Clients
  - type: horizontal-stack
    cards:
      - align_state: left
        entities:
          - color: '#19D541'
            entity: sensor.bloomhole_dns_queries_today
            name: Total Queries
        font_size: 75
        font_size_header: 22
        hour24: true
        line_width: 3
        points_per_hour: 2
        icon: 'mdi:earth'
        show:
          icon: true
          points: false
        style: |
          ha-card {
            border-radius: 12px;
            background-image: none;
            box-shadow: none;
            background-color: rgba(114, 123, 140, 0.1);
            font-weight: bold;
           }
        type: 'custom:mini-graph-card'
  - align_state: left
    entities:
      - color: '#20BEE5'
        entity: sensor.bloomhole_ads_blocked_today
        name: Ads Blocked
    font_size: 75
    font_size_header: 22
    hour24: true
    line_width: 3
    points_per_hour: 2
    icon: 'mdi:hand-right'
    show:
      icon: true
      points: false
    style: |
      ha-card {
        border-radius: 12px;
        background-image: none;
        box-shadow: none;
        background-color: rgba(114, 123, 140, 0.1);
        font-weight: bold;
       }
    type: 'custom:mini-graph-card'
  - align_state: left
    entities:
      - color: '#EEA527'
        entity: sensor.bloomhole_ads_percentage_blocked_today
        name: Percent Blocked
    font_size: 75
    font_size_header: 22
    hour24: true
    line_width: 3
    points_per_hour: 2
    icon: 'mdi:chart-pie'
    show:
      icon: true
      points: false
    style: |
      ha-card {
        border-radius: 12px;
        background-image: none;
        box-shadow: none;
        background-color: rgba(114, 123, 140, 0.1);
        font-weight: bold;
       }
    type: 'custom:mini-graph-card'
  - align_state: left
    entities:
      - color: '#DC3F1C'
        entity: sensor.bloomhole_domains_blocked
        name: Domains on Blocklist
    font_size: 75
    font_size_header: 22
    hour24: true
    line_width: 3
    points_per_hour: 2
    icon: 'mdi:format-list-bulleted'
    show:
      icon: true
      points: false
    style: |
      ha-card {
        border-radius: 12px;
        background-image: none;
        box-shadow: none;
        background-color: rgba(114, 123, 140, 0.1);
        font-weight: bold;
       }
    type: 'custom:mini-graph-card'
show_header_toggle: false
title: PiHole
type: entities

Any ideas to get what I want?

This has nothing to do with the mini-graph card and this was the wrong place to post. You need to use a couple of tricks to put a horizontal stack in an entities card. See here: đŸ”č hui-element - Use built-in elements in the wrong place

2 Likes

Thanks! That is exactly what I’m looking for.

I am trying to use the mini-graph card with this code.

#
# Atmospheric Quality
#
- type: "custom:vertical-stack-in-card"
  cards:
    - type: 'custom:mini-graph-card'
      align_state: 'right'
      decimals: 0
      height: 50
      hour24: false
      unit: 'AQI'
      color_thresholds:
        - value: 0
          color: '#00e400'
        - value: 51
          color: '#ffff00'
        - value: 101
          color: '#ff7e00'
        - value: 151
          color: '#ff0000'
        - value: 201
          color: '#990049'
        - value: 301
          color: '#4c0026'
      show:
        fill: 'fade'
        icon: false
        labels: true
        name: false
        points: true
      entities:
        # - entity: sensor.aqi
        - entity: sensor.aqi_particles
          color: 'Brown'
        - entity: sensor.aqi_ozone
          color: 'DeepSkyBlue'
        - entity: sensor.aqi_carbon_monoxide
          color: 'DarkSlateGray'

This is the view I get
Screenshot from 2020-06-12 12-31-20

What am I doing wrong (I have all the cards installed in HACS and in Lovelace)
Thanks
carltonb

There’s most likely no history available for the entities.
See recorder and make sure it’s setup, working & recording the entities correctly.

Thank you for the hint.
Stupid yaml spacing on my part failed the recorder.yaml file.
Appreciate it.

2 Likes

for some reason my graphs are not showing. any idea where i should look for. did re-installation too but no luck.

color_thresholds:
  - color: '#ff0505'
    value: 74
  - color: '#ff7a05'
    value: 70
  - color: '#ffcd05'
    value: 65
entities:
  - sensor.cpu_temperature
show:
  labels: true
type: 'custom:mini-graph-card'