Lovelace: mini graph card

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.

Mmm :frowning: Could I build it using javascript (and e.g. chart.js) in a custom card type?

Yes you could create your own custom card: https://developers.home-assistant.io/docs/frontend/custom-ui/lovelace-custom-card/

Post your own topic if you wish to discuss that as it’s starting to drift off topic here.

I’ll try and will create a separate topic if I need help or want to share my results. Thanks!!

Has there ever been a request to have an option to show data between two sets of hour ranges? If not would this be possible please?

For example, I currently have a graph showing the last 5 days worth of temperature readings, but I would also like another graph next to it showing the last 5-10 days data as well. I’d like two separate graphs so that the data isn’t too squashed up.

Maybe an extra field in addition to hours_to_show could be hours_to_show_from that then ties into the existing option, so to achieve 5-10 days it would be:

hours_to_show: 120
hours_to_show_from: 120

Thanks.

Is there any way to enable a system-wide option for 24h display, or can that be taken from the system configuration somehow?

I would like to avoid setting:
hour24: true


for each and every card I setup.

There’s a request for this feature open here

No, but this is a great idea, should default to what’s specific in HA, I’m pretty sure that information is exposed to custom cards so should hopefully be possible to implement.

Thank you Karl, this would be excellent! Just discovered this component and still trying to learn how to handle this mighty beast :smile:

1 Like