Lovelace: mini graph card

The popup comand will not work without a title.

The old syntax with browser_mod.command still works, for backwards compatibility. That’s also why I didn’t anounce it more clearly.

2 Likes

Thank you.
All working now.

Hi all !

I have a problem with this plugin :frowning_face:

Install with HACS, sensor is OK in the default card :
image

to the top of my raw config :

image

and mini-graph-card-bundle.js + js.gz are all two in the good folder \config\www\community\mini-graph-card

do you have any idea of what i’m doing wrong ?

Thanks in advance :wink:

Don’t use capital letters in your entity ids.

1 Like

Wow, wasn’t a probleme for the default card, but was a problem for mini_graph_card …

Solved my problem,

Many Thanks !!

Hey there,
I was wondering if there is the possibility to ignore invalid/empty entities in the config

      entities:
        - entity: '[[entity]]'
          name: Temperature
          color: '#FF5000'
          show_fill: false
        - entity: '[[entity2]]'
          name: Outside
          color: '#0099CC'
          show_state: true
          show_fill: true
        - entity: input_number.night_time
          color: '#B3B3B3'
          name: Night Time
          show_fill: true
          show_line: false
          show_points: false
          show_legend: false
          y_axis: secondary

I am using this in combination with the decluttering card and I can send variables ([[entity]]) this way:

              - type: custom:decluttering-card
                template: temperature
                variables:
                  - entity: sensor.patio_temperature

In the even (or requirement) that [[entity2]] comes empty, would be possible to simply not showing the specific entity rather then having the card fail?

Uncaught (in promise) TypeError: Cannot destructure property 'state' of 'this.entity[b]' as it is undefined.
    at HTMLElement.renderState (mini-graph-card-bundle.js:1)
    at mini-graph-card-bundle.js:1
    at Array.map (<anonymous>)
    at HTMLElement.renderStates (mini-graph-card-bundle.js:1)
    at HTMLElement.render (mini-graph-card-bundle.js:1)
    at HTMLElement.update (mini-graph-card-bundle.js:1)
    at HTMLElement.performUpdate (mini-graph-card-bundle.js:1)
    at HTMLElement._enqueueUpdate (mini-graph-card-bundle.js:1)
Uncaught (in promise) TypeError: Cannot destructure property 'state' of 'this.entity[b]' as it is undefined.
    at HTMLElement.renderState (mini-graph-card-bundle.js:1)
    at mini-graph-card-bundle.js:1
    at Array.map (<anonymous>)
    at HTMLElement.renderStates (mini-graph-card-bundle.js:1)
    at HTMLElement.render (mini-graph-card-bundle.js:1)
    at HTMLElement.update (mini-graph-card-bundle.js:1)
    at HTMLElement.performUpdate (mini-graph-card-bundle.js:1)
    at HTMLElement._enqueueUpdate (mini-graph-card-bundle.js:1)

Let me know if you need me to open you a ticket in GitHub or if is something too complicate :slight_smile:

Thanks

Hello,

Handling of empty entities shouldn’t be hard to implement, we could simply skip over these when ceating the internal card configuration.
Handling of unknown/invalid entities could be a bit tougher but definitely doable.

Yes, please open an issue about it, the card should handle these kind of things, I’ve just been to lazy to implement it :laughing:

Thanks!

3 Likes

Done, thank you very much.

In my opinion, for now at least, empty one is enough since it shouldn’t send invalid data, but yes in the future the ability to ignore invalid data might be useful aswel.

The endgoal which I think can be quite common, is to create a single template (in my case for temperatures) and use it in different occasion with 1 or more sensors (depending on the specific use), without having to create a template that include 1 sensor (as variable) and another that includes 2,3,4,etc. sensors (still as variables).

Hope it makes sense :slight_smile:

1 Like

Hi guys. I seem to be having an issue with the icon in this mini graph card.
I am using sensors to measure watts but the default icon is a thermometer?
Am I able to manually override the icon to something else?
Many thanks

Hello,
The card will try its best to find a suitable icon based information provided by the sensor (mainly device_class). If it can’t find a match or if no information is available it will fallback to a thermometer icon.

You can however override the icon by specifying the option icon and any mdi icon in the card config.

icon: mdi:flash
1 Like

Or customize the entity…

1 Like

This worked perfectly… I was putting the icon info on the wrong line :wink:

Andrea would you mind to share this lovely setup for power consumption monitoring :slight_smile: I would like to copy many parts of it, if you allowed me. One final question no solution yet for utilty meter monthly readings right? I have been digging in the last 500 posts,
On the other hand and totally off-topic, do you consider or have any card to show stacked bar with several entities compared with total consumption?

Hi Diego,

My whole configuration it is now available on GitHub at this address: https://github.com/SeLLeRoNe/HA-Config

For the monthly reading for now no, there is no solution.
And for the last bit, it would be very nice if the mini-graph-card would have the ability to stack on bars because that would allow me to have the total with “a bar per room” and different color to easily see what room is counsuming what, specially in the “whole house” view of things:

To be honest, I didn’t look for other cards, specially because I love this card and I prefer to wait for it to have it :slight_smile:

2 Likes

Thanks a lot Andrea @SeLLeRoNe I do like a lot mini-graph-card, I have used Grafana but it is terrible slow, it just the stack bar the only function I miss from power and energy monitoring. For the rest I´m using mini-graph-card

Hello, I can’t see where is the problem with my setup but I can’t get color threshold work, this is my config:

type: 'custom:mini-graph-card'
    entities:
      - sensor.temp_office_2
    update_interval: 1
    points_per_hour: 1
    show_state: true
    hour24: true
    color_tresholds:
      - value: 0
        color: '#81A1C1'
      - value: 18
        color: '#D08770'
      - value: 19
        color: '#BF616A'

with this conf it’s shown as this

image
there is no color line change at any point, what should I do?
Thanks.

Check your spelling:

color_tresholds:
       ^
2 Likes

OMG … :sweat_smile: I’ve been looking after the issue for a long time and haven’t seen it … thank you so much :see_no_evil:

2 Likes

I was able to use the secondary y-axis to visualize the two different heating systems (boiler/heat pump) turning on and off. I couldn’t figure out how to hide the overflow in the bottom radius corners but I don’t mind! Thank you for a great tool.

Made possible by:
simple-thermostat
mini-graph-card
vertical-stack-in-card
ios-dark-mode-theme

17 Likes

Awesome setup!
Not sure why you are having the overflow, this was an issue in the card way back but was fixed like a year ago in v0.3.1 so if you haven’t updated the card in a while please try updating it and check this issue if you’re using HACS.

If that doesn’t solve it would you mind sending me your complete config (in a PM preferably)? including the vertical-stack-in-card, potential card-mods and all other stuff.

Thanks!