Lovelace: mini graph card

I did look into monitor.sh long time ago and yes, it does look a bit of a mess to configure…
I guess I’ll have to do it at some point…

I have noticed on my test that the state_map wasn’t working… at least not all the time… So for night/day I do use a template sensor, you might want to use the same…
Just make it return 1 or 0 depending if it’s home or away :wink:

Everything is cheaper from Aliexpress!

Yes I did think of this, but I was sure there was a way to do this without, therfore my OCD would not let me do it! :rofl:

Hello everyone,
I got two questions for you.
Is it possible to group by week or by month?
Is it possible to display multiple entities on a bar chart?
I use utility_meter integration to know my energy consumption at home for five different power sensors.
I would love to see per week/month the usage of each sensor and compare them to each other.
Anybody knows how to achieve that?

Hello!

No, you could group by a rolling seven days period but I guess you want it to be sunday-sunday.
For a rolling 7-days set points_per_hour to 0.005952380952381 (1/168) and hours_to_show to 168 times amount of weeks you want to display.

Yes, you can list several entities under the entities option.

Ok, thank you @kalkih. Is there any other bar chart for Lovelace?

You’re welcome, this is the closest I know of

hi,in last update(0.9.0) my config is broked:

          show:
            legend: true
            icon: false
            graph: line 
            name_adaptive_color: true
            extrema: true

there are changues about this?
extrema and graph option,they disappear from the card

Thanks, broken extrema is now fixed in 0.9.1.

(The broken extrema caused the graph to not render properly as well)

1 Like

Thanks to you for your work

1 Like

Ok, so is this a mini-graph-card issue or,a HACS issue (@ludeeus) or just something wrong with my config?

(I haven’t changed this config for a long time but I could have missed a breaking change I guess.)

According to HACS I am on 0.9.1

image

According to Chrome I’m still on 0.9.0

And I get the rendering error mentioned that was fixed in 0.9.1 so I’m guessing I am actually on 0.9.0.

Sometimes I get neither graph but refreshing can bring back the top one as shown here…
image

      - type: entities
        title: ''
        show_header_toggle: false
        entities:
          - type: custom:mini-graph-card
            entities:
              - entity: sensor.unifi_gateway_www_xput_down
                name: Download
                color: green
              - entity: sensor.unifi_gateway_www_xput_up
                name: Upload
                color: blue
            hour24: true
            points_per_hour: 2
            height: 100
            line_width: 3
            font_size: 75
            lower_bound: 10
            show:
              extrema: true
              labels: false
              # points: true
              name: false
              icon: false
            style: |
              ha-card {
                --ha-card-box-shadow: none
              }

          - type: custom:mini-graph-card
            entities:
              - entity: sensor.unifi_gateway_www_speedtest_ping
                name: Ping
                color: yellow
            hour24: true
            points_per_hour: 2
            height: 50
            line_width: 3
            font_size: 75
            lower_bound: 0
            upper_bound: 20
            show:
              extrema: true
              labels: false
              # points: true
              name: false
              icon: false
            style: |
              ha-card {
                --ha-card-box-shadow: none
              }
        style: |
          ha-card {
            --ha-card-box-shadow: none
          }

I think what you want to do is to have stackable card, for that there is already an FR openon GitHub: https://github.com/kalkih/mini-graph-card/issues/79

Regarding the graph you want to do, I think I know what you would like and I have been working on something like this quite a bit, not sure you saw my post here: Lovelace: mini graph card

If you want my whole config is on GitHub at this URL: https://github.com/SeLLeRoNe/HA-Config
You can look into it and take inspiration (or literally copy the code) for your goals.

Have you tried to clean your browser cache or to updating pressing CTRL+F5?
Also, just in case, have you tryed to use the refresh inside Lovelace?

As last test, have you tried to reintall via HACS?

Yes.

Yes.

Yes.

And ‘Empty cache and hard reload’

Still got 0.9.0 :roll_eyes: :man_shrugging:

That’s quite odd, try to remove it and install it back from HACS (no need to change configs and/or restart HA)

Hi,after updating to 0.9.1 version,my graph has a weird issue:


It doesn’t visualize both min,avg and max graph but only one.It happens with every entity,i tried to create a new card,clear cache but no way.
My config is the same as in the example on github page and never a problem before 0.9.1.

- type: custom:mini-graph-card
  entities:
    - entity: sensor.dark_sky_temperature
      aggregate_func: max
      name: Max
      color: #e74c3c
    - entity: sensor.dark_sky_temperature
      aggregate_func: min
      name: Min
    - entity: sensor.dark_sky_temperature
      aggregate_func: avg
      name: Avg
      color: green
  name: Temp outside daily (last week)
  hours_to_show: 168
  group_by: date

Did i miss something or it’s a bug?

Definitely a bug when using the same entity more than once in the same config.

I’m moving this weekend so could be a few days before I have time to address.

This is exactly why I decided to start logging the version number.
I’ve had many HACS users reporting issues with getting the latest version to load properly even though HACS says it’s installed, from my understanding reinstalling the card usually fix it.

Thanks yes I’m OK now, but I did need to clear the cache in between uninstalling and reinstalling.

Hello,

I am having a problem with graph card. I upgraded to the newest version and now I am getting this console error:

And there are no graphs showing.
I also tried to reinstall it, but it made no difference.

Here is the configuration of the card and how it looks at the moment: