Lovelace: mini graph card

color of contents within the “style box”

The “style box” is not a native card’s feature.
This is a card-mod trick.
You may put whatever you want into this box of any color.

Hi sorry I might have not been clear enough, would I be able to have the contents of the style box have the color based on different state value? Do I need to look more into card-mod for this?

Whatever you want using jinjia & state objects.

As always - we are not supposed to use smth just by “copy/paste”.
Card-mod will allow you to set CSS properties.

Probably a super simple thing but I can’t figure out or find any way to show the timeline at the bottom that will tell me the time of day?

image

You can’t — it’s kind of a feature. Have a look at ApexCharts card - A highly customizable graph card as an alternative.

does this still work? I cannot get it to work for me.

It works as I already demonstrated in your Github issue.
Show your SHORT code which does not work.

Hi - I have tried it now for hours before posting and thought I should not continue that other thread as it is a different topic:

  - type: custom:mini-graph-card
    entities:
      - entity: sensor.outside_temp
        state_adaptive_color: true
        show_fill: false
      - entity: sensor.hottest_temp
        color: grey
        y_axis: secondary
      - entity: sensor.coolest_temp
        color: var(--paper-card-background-color)
        y_axis: secondary
    [...]
    card_mod:
      style: |
        .fill { white;
          opacity: 1 !important;
        }

thanks.

Made an an error while copy/paste.
Find a proper code here.

1 Like

Thanks. Is card_mod supposed to be there (I have tried it with and without and it still does not work for me).

  - type: custom:mini-graph-card
    [...]
    card_mod:
      style: |
        .fill {
          fill: white;
          opacity: 1 !important;
        }

Yes, was answered here.
Take my example from that issue, just put your own sensors - check if it works.

I used your example exactly from your post (my sensors) and here and it does not work for me - I still have transparency.
Screenshot 2022-08-14 at 11.57.25

It works here:

Finally, my very quiet & humble question: do you have card-mod installed? ))

I totally understand you asking that question but, yes, I do :slight_smile:

Screenshot 2022-08-14 at 12.23.00

…strange, isn’t it?

edit: If I change ‘white’ to ‘back’ the fill disappears, so card-mod is doing something.

    card_mod:
      style: |
        .fill {
          fill: black;
          opacity: 1 !important;
        }

Screenshot 2022-08-14 at 12.26.11

Write me a PM. Otherwise we will occupy the thread)

1 Like

Is there any way to only show the state on a mouse hover or on a tap of the point in question?
(but not show the state otherwise)

If I turn off state, then it doesn’t show on hover.

show:
  fill: false
  name: false
  icon: false
  state: false

Thanks for making this card!

Here’s my use case:
This is a 24-hour temperature graph of the different rooms in my house + 2 outside temperatures. I’m aiming for a minimalistic/simple look, but want to see the specific temperature when I interact with the graph.


How it looks if state is turned on and a point is selected. (Ideally, I wouldn’t want the graph to shift down when the state was shown only on hover)

Thank you for this very nice card! I’ve been running an older version for a long time and just installed the latest but I get a triangle that looks like a warning, and I can’t find an error message:

Did you try a hard refresh or clear your cache?

Thank you very much for your answer! I have tried hard refresh and clear cache but the problem remains, the triangle is there. I have gone back to the old version (not sure what version numer or where I can check) to get rid of the triangle. I would of course like to use the newer version if it was possible.