Lovelace: mini graph card


#207

This is with

  - type: custom:mini-graph-card
    entities:
      - sensor.temperature_sitting
    name: Temp
    #location_icon: left
    #location_state: center
    show:
     graph: true
     fill: true
     extrema: true
    color_thresholds:
      - value: 10
        color: "#f39c12"
      - value: 20
        color: "#d35400"
      - value: 21.5
        color: "#c0392b"

Hope this helps.


#208

Fix in place, I’ll make a new release, coming in a few mins, I’ll report when it’s available.
Sorry.


#209

NEW RELEASE v0.2.4

Okay, let’s try again… a few quick fixes and a new style option for the graph fill.

Changelog

  • New: Parameter fade for show -> fill option, makes the fill fade out

  • Fixed: History entries with null state breaking graph (#46)

  • Fixed: Compatibility issues with the custom swiper-card

  • Fixed: Broken extrema


#210

That was very fast…

You are the Man :stuck_out_tongue:

All works thank you very much. :grinning::grinning:


#211

Thank you,
Although, I shouldn’t have put up the broken release in the first place :wink:


#212

If the issue was the card not taking up the full width, it should be fixed with the latest release v0.2.4

hyperion_8123_lovelace_4%20(22)


#213

Thanks! That was exactly what I mean in an horrible english :smiley:
Thank you very much!


#214

Thank you also for fixing extrema… I tought i was doing something wrong! :smiley:


#215

Oh, wow. That was fast. I just updated to v0.2.3 and wanted to mention here that the graph didn’t show up anymore, just to see that you already released a bugfix release, really awesome!

It’s working fine now, now that I use v0.2.4. I do have to change some of my threshold colors to make them flow nicely into each other, but I’m really liking this!


#216

I got a new suggestion :slight_smile:
Would be possible on the extrema version to have min and max for each entity?
See screenshot below:
image

Thanks again
Andrea


#217

And maybe… the ability to don’t show the dots for the history view? ^^

Cheers
Andrea


#218

Sure, I’ll consider it for a future release!

This should already be possible, try:

...
  show:
    points: false
...

#219

Great!!!
That was clearly me failing on reading the whole documentation rather than you sucking at it! :smiley:


#220

New one! :smiley:
How about move the color definition (including width, threshold and everything related to the color) on the entity definition line rather than the top level configuration.

This way it would be way easier to define colors per-entity and also play around with various threshold and everything else on a per-entity base.

Not sure how hard this would be to implement, I just keep thinking on how improve the view (and the configuration, why not) and this might be very helpful especially for less “coding experienced”

Andrea


#221

I guess we all miss some things here and there :laughing:

The problem I see with moving everything from the base to the individual entities is that it would be quite annoying having to specify for example line_width for every single entity instead of just once in the base.

It’s a good idea though, maybe move some of the options, or even better, have them available in the entity object as well as in the base. That’s actually what I did with color, you can now set color in the entity object and it will override the color options set in the base.

It would not be hard, just require some additional checks when deciding how and what to render.

I guess we could add width, unit and potentially color_thresholds (this one would require most work) to the entity object.

What do you think?


#222

I think you do actually have a point, maybe leave the “general” one so that are sort of “baseline” if nothing different is specified on a per-entity base.

That will cover the annoying part (well, will remove it for good) and still give a lot of flexibility in terms of per-entity customization :slight_smile:


#223

Can’t make dynamic line color to work:

- type: custom:mini-graph-card
            entities:
              - entity: sensor.kitchen_humidity
                color: "#0ab4ed"
                name: Humidity
                show_state: true
            icon: fas:tint
            hours_to_show: 24
            hour24: true
            font_size: 90
            decimals: 1
            animate: true
            color_thresholds:
              - value: 20
                color: "#f39c12"
              - value: 21
                color: "#d35400"
              - value: 21.5
                color: "#c0392b"

What do I miss?


#224

I think it might be because you also have a color set in the entity definition, try to remove it from there.


#225

yeah specifying colour overides the thresholds.


#226

Yes! That’s it. Thank you guys.