Lovelace: mini graph card

Good graphic is possbile to have the code please?thanks

A littlebit off-topic but how did you get that font?

Simply add the following link as a resource.

resources:
  - url: https://fonts.googleapis.com/css?family=Raleway
    type: stylesheet
1 Like

I really love this, my only question can I only show the value for today so starts at 00:00 instead of specifying the hours to show?

Schermafbeelding 2021-06-13 om 11.31.35

You cannot. Use apexcharts-card for this.

Anybody experienced issues with graphs not showing when using HA Cast? The card is shown but not the content within it.

This is what the dashboard should look like:

This is what’s displayed on the Nest Hub:

I am just digging into mini graph card and my current issue is the question of how the grouped _by: hour / date work beyond date or in particular in that “interval” cause I have not found any example about that.

group_by: interval
Where can I define that interval for weekly or monthly or so ?

I will need it for power consumption and I hve already the hourly, daily, weekly, monthly sensors set up that count the values up and will be rested at midnight in case day or week or month ends. Any ideas or examples ?

SOLVED by me a week later and described below or here

Hi,
I love your graph for the Purifier.
Are there any chances to share your configs for the mini graph?
Maybe somewhere on github … or at least share here the mini graph …
Thanks

Hi there!

Sure, it’s not a secret or something :slight_smile: I actually already did in Button card thread here. You will find latest pic and config for all the components.

Anyone knows if I am able to do some math functions (/1000) for one of the entities in the graph?

6 posts were merged into an existing topic: Graphing Energy

Have you tried this:

Try using “value_factor” option.

15 posts were split to a new topic: Graphing Energy

I am trying to set color thresholds but not seeing any result. I ahve three pen traces on the trend and want only one of them to be blue if positive and red if negative.

type: custom:mini-graph-card
entities:
  - entity: sensor.meter_power_a
  - entity: sensor.meter_power_b
  - entity: sensor.meter_power_c
    color_thresholds:
      - color: blue
        value: 100
      - color: red
        value: -100
name: Solar Power
hours_to_show: 24
points_per_hour: 4

Change the lines / attributes cause this one works

    color_thresholds:
      - value: 100
        color: blue
      - value: -100
        color: red

at least here - used for weight / scale with different threshold values of cause.

Wrong indentation. This is a property of the card, not for some entity.

1 Like

hey friends of ha.

I actually want to make a graph like in the picture.

That if I have power left over from the solar panels, the beam goes up, and I consume more power than I generate, the beam goes down and turns red…

Who already made this? And can share the code with me?

1 Like

Hello,
I am trying to change the color of the temperature value based on some predefined values ​​but I am not very good with css and consequently it does not work.

This is the code:

      - type: custom:mini-graph-card
        style: |
          ha-card .states.flex .state .state__value.ellipsis{
          {% if is_state_attr('sensor.ble_moisture_xxxxx', 'median', >=21)}
            color: orange;
          {% elif is_state_attr('sensor.ble_moisture_xxxxx', 'median', <=20)}
            color: red;
          {% endif %}
            color: green;
          }
        entities:
          - entity: sensor.ble_moisture_xxxxxxx

The color is always white as you can see from the image below:

screencolorgraph

I took a cue with this portion of code I found on this post:

style: |
  ha-card .states.flex .state .state__value.ellipsis{
    color: orange;
  }

Thank you for you help!

I can only see a 20% figure and no temperature °C
From my experience you will be able to change the white 20 but not the colour of the unit % which is a tinted white. You can choose orange and the 20 will be orange and the % will be in a different kind of orange.

But I guess you want to let the 20 figure display or represent the sensors value / color.