Lovelace: mini graph card

Choose any of three variants.
image

Hi all. I have to ask here, because I can’t figure it out…

I have a temperature sensor that is acurate to 0.1 degrees. However, I don’t need that accuracy and only want to show a graph of the temperature rounded to the nearest degree. The rounding itself seems to work fine by using the decimals: 0 part. But the graph does not reflect that. As you can see, it’s showing many tiny increments in temperature:

This probably comes directly from the source data:

So how can I set increments for the Y-axis so that it only shows whole degrees (20, 21, 22,…) and not decimals?

The decimal option only affects the state displayed. You didn’t share your config, but it looks like you’ve deliberately turned smoothing off. I think your best bet is a combination of turning smoothing on and setting y-axis limits to make the “artifacts” less apparent. Otherwise, create a second template sensor where you’ve applied the rounding and display that.

Seems that this option is omitted and hence is =true (default value).
The sensor changes very rarely, hours_to_show=24h, points_per_hour=30 - this looks like the graph is with “smooth=false”, but it could look same with “smooth=true”.

BTW, I always set “aggregate_func=last”, “smoothiing=false”, “points_per_hour=as many as applicable” - to reduce an affect of approximation.

Is it possible to use fixed_value to create a height bar per sensor? like this?

this is what i get
phase

type: horizontal-stack
cards:
  - type: custom:mini-graph-card
    entities:
      - entity: sensor.current_l1_tibber
        fixed_value: true
        show state: true
    name: L1
    show:
      icon: false
  - type: custom:mini-graph-card
    entities:
      - entity: sensor.current_l2_tibber
        fixed_value: true
        show state: true
    name: L2
    show:
      icon: false
  - type: custom:mini-graph-card
    entities:
      - entity: sensor.current_l3_tibber
        fixed_value: true
        show state: true
    name: L3
    show:
      icon: false

"fixed_value"is used to display one CONSTANT value (flatline).
It has nothing about a height.
What you probably need is:

lower_bound: 0

Thanks!

However, i kinda want that flatline showing only current value out of a max of 50.

The reference i posted is showing not a graph, but only a current state, which for my case would be nice.

How do i do that? Is it possible?

Not clear what you need, elaborate.

can you share your code?

I basically just want to get as close as possible to this:

Only showing current use and no history. Each bar is a separate sensor.

1 Like

Then I already proposed you to use “lower_bound=0”.
But you declined this proposal due to unclear reason.
If you need the whole area below the line colored of the same color - use “fill=true”.

Yes, i tried that, but is that not just adjusting y axis? It is still showing a historic graph.

Probably not getting your point, but may be you need not a graph at all but something like a vertical bar-card.
Search for custom:bar-card.

Thanks! Will look into it!

Just to clarify, so that i know what fixed value does.

If you have graph based on a sensor which is showing 25 out of 50. Using fixed value, will the graph be on the middle of the y axis or on the bottom like my result?

Do not remember.
Open source code, find “fixed_value” and check what it does.

hi im trying to get a chart something like this , can someone help
image
these sesnors keeps updating state for every 5 mins and i want it show the recent value in bar graph like this …is it possible?
soo far made this but its no way near to something i wanted also is it possible to change the header value to some other sensor value
image

image

thanks for responding but i want it in a graph type like below. below it shows for months but i want it to show for one day and the highest value to be showed
and he have used single sensor to compare but i want it to show for 5 sensors in bar time like below …it could be great if you could vouch…

hi is their, anyway to get chart something like this?

You may do everything supported by mini-graph-card. Some tricks may be done by card-mod. Do not ask about things which are obviously cannot be achieved )).

1 Like