Lovelace: mini graph card

It’s winter here in Australia :wink:

4 Likes

And there it was, the 0.9.4 version with soft bounds :slight_smile: Thanks :+1:

1 Like

Just to verify, there is no way to plot data from an attribute without first turning that data into an entity state using a sensor template, etc? I have historical (not todays usage, but past) data provided by my power company as a sensor attribute:

daily_usage: 
- usage: 61
  cost: 5.91
  date: '20200701'
  max_temperature: 92
- usage: 61
  cost: 5.91
  date: '20200702'
  max_temperature: 94
- usage: 57
  cost: 5.54
  date: '20200703'
  max_temperature: 90

Id love to be able to plot this data. Is there any way to feed the card exactly what data we want to graph versus having it simply use historical entity state values?

No, you would have to create a template sensor and feed that entity to the card, the utility_meter integration could possibly be useful as well


Pardon my ignorance
 what are soft bounds? I found no explanation in documentation


upper_bound_secondary number or string v0.5.0 Set a fixed upper bound for the graph secondary Y-axis. String value starting with ~ (e.g. ~50 ) specifies soft bound.

The y-axis is normally set to the values of lower and upper bounds, but if the graph value is lower than the lower bound or higher than the upper bound, the y-axis is expanded.

2 Likes

Alrealy like that ! :+1:

Hi there,
I’m trying to use mini-graph with a climate entity from Honywell but it can’t display any values.
If i take the same entity with a history-graph it works as seen bellow :
image
the yaml file is the following :

        cards:
          - type: custom:mini-graph-card
            entities:
              - climate.rez_salon
            name: LIVING ROOM
            hours_to_show: 48
            points_per_hour: 0.25
          - type: history-graph
            entities:
              - climate.rez_salon
            name: LIVING ROOM

What am I doing wrong ?

This card doesn’t support climate entities out of the box, you’d need to create a template sensor from the temperature attribute and use that template sensor in the card.

Thx, I’ve just learned how to create template (not so hard), and now it’s working. Just have to wait I think a little bit to collect historical data

1 Like

Looks awesome, could you confirm how you achieved your waste pickup countdowns? Sorry if thats a noob question very new to home assistant. thanks

2 Likes

Either what tom_l suggested, or I would guess it is Waste Collection Framework. :slight_smile:

1 Like

Hi,
is there a possibility at mini graphic card to display values exactly for one day from 0:00 to 24:00 o’clock or do I have to solve this with the data source.

I want to show the house performance of the current day on my overview page and not the last 24 hours.

Hi Karl Kihlström,
First I want to thank you for developing this card and much more, your work is awesome,
I have a request regarding the “mini graph card” what I’m asking is the option to use a custom image instead of an icon, like RomRider did in his great button-card.
Can you please consider integrate this option in future releases?
Thanks a lot.

I used this card before for different entities and they worked fine but trying to match sensor values from Dexcom but the graph is not matching with sensor values. How do I achieve that?

Screen Shot 2020-07-25 at 10.05.48 PM

Screen Shot 2020-07-25 at 10.04.39 PM

      - type: custom:stack-in-card
        title: Glucose values
        mode: vertical
        keep: 
          background : true
        cards:
          - type: horizontal-stack
            cards:
              - type: entity
                entity: sensor.dexcom_vc_glucose_value
                name: Glucose value

              - type: entity
                entity: sensor.dexcom_vc_glucose_trend
                name: Glucose Trend

          - type: horizontal-stack
            cards:
              - type: 'custom:mini-graph-card'
                animate: true
                font_size: 80
                line_width: 4
                hour24: true
                hours_to_show: 24
                show:
                  points: true
                  average: true
                  extrema: true
                color_thresholds:
                  - value: 100
                    color: "#f39c12"
                  - value: 200
                    color: "#d35400"
                  - value: 250
                    color: "#c0392b"
                entities:
                  - entity: sensor.dexcom_vc_glucose_value
                    name: Glucose value history

The graph pop-up is displaying 4-5 hours while your mini-graph-card is configured to 24 hours.

Does this still work?

I cant get it to change the title opacity.

style: |
  .name > span {
    color: white;
    font-size: 20px !important;
    font-weight: 300;
    opacity: 1 !important;
  }

Edit. It would help if I could spell. Corrected config above works.

1 Like

So I finally have a proper way to make a range of sensors for forecasted precipitation with climacell API. All the other Hass buienalarm & buienradar components where not flexible enough for my taste.

This will result in a range of sensors, e.g.

  • sensor.cc_rain_forecast_precipitation_00m
  • sensor.cc_rain_forecast_precipitation_05m
  • sensor.cc_rain_forecast_precipitation_10m
    

  • sensor.cc_rain_forecast_precipitation_120m

Each sensor also has an attribute “observation_time”

What I would like to do is create a graph connecting these 25 rain forecasts (amount of rain as Y-axis value) and use the observation time as x-axis value. So you’ll get something like buienalarm.nl

Is this possible with mini-graph? If not, anyone knows how I can achieve this?

Home assistant sensors are value vs time series. You have 25 separate value vs time points you want to graph all located in different sensors. The only way you are going to be able to graph that is with a scatter plot, like in a spreadsheet. Or maybe the JuypiterLab addon (I don’t use this so am not sure).

I think a two variable scatter plot would be a great addition to home assistant (e.g. graph hourly bins of inside vs outside temperature to see how well your house is insulated) but as yet this does not exist. Not even possible in Grafana. Again they are time series graphs only.