Changing Graph Scale

I don’t think there is a way. If you want to see more time, just adjust the calendar at the top. Make sure that if you change it to view more days that you move back in time the number of days you want to view.

I.E, You want to view 3 days of information in the past, you’d place the first day as Tuesday and change it to view 3 days.

Thanks, though I don’t need more time, I just want the Y-axis to be fixed so it always has the same range

i have the same question but for X-axis.

on sensors graph, X-axis is displayed in hour, … i would like to display it in day/month/yeah

is there a way to do that ?

1 Like

Nope, not possible.

i will make a suggestion with that, i think it can be a usefull things

I was looking for the same but it seems impossible to do for now.
My meanwhile solution for this is to add other “fake sensors” which are actually input_numbers. both have constant values, in your case one at 0 and the other at 100. this way it will force the graph to show all that range.

1 Like

Do you have a example ?

something like this:

  - type: history-graph
    title: 'Temperatures'
    hours_to_show: 48
    refresh_interval: 120
      - entity: sensor.temperature_1
        name: C. à coucher
      - entity: sensor.temperature_2
        name: C. des filles
      - entity: sensor.temperature_3
        name: Salon
      - entity: input_number.min_graph  #you set this input number to the minimum you want to show in your graph
        name: min
      - entity: input_number.max_graph  #you set this input number to the maximum you want to show in your graph
        name: max

How do i set the input_number.min_graph in the configuration.yml ?
I get the input_number to show up but it is a slider…
I don’t know what i do wrong.

Got it to work…
but dont know if its good code or not… haha
i’ll post my code later today.

How did the code turn out?

Any update in topic? I would love to set my graphs of temp and humidity to static min max so it would be easy to compare day to day.

nope, not possible

Wow. Scale limits are like, graphing 101. I find it hard to believe it’s not baked into the graphing module. I’ll see what I can do about this.


It does seem like an oversight in hindsight I guess. Logarithmic graph y axes would also be great (i have a graph of my PC power utilisation + tumble dryer + comms cabinet + washing machine - when running the tumble dryer at 2.5kw autoscales the graph so the PC usage is pointless graphing - but I don’t want/need separate graphs, and i raised a feature request for spike filtering and graph data reset too (here) - that would be amazing to see these features.


I have a speed test graph and due to the auto Y-axis scaling, it makes it look like wild fluctuations when in fact the differences are not that large. E.g this is the graph for a gigabit connection

If the scale could be locked at 0-1000 it would be much more accurate. There’s probably a way to do this with a custom template or something but as a beginner I’m stumped.

Would be really good to know if anybody got this working. I’ve tried creating input_number values of 0 and 100 and adding them to the graph but it seems to ignore the values and won’t graph or scale using them. Don’t know if I’m doing something wrong, my code block looks like this

chart_type: line
period: day
days_to_show: 30
type: statistics-graph
  - sensor.13_025663_relay_demand
  - entity: input_number.min_graph
  - entity: input_number.max_graph
  - mean

And I have min_graph and max_graph defined as 0 and 100 in the helpers. Not sure what else to try?

I just tried this too. It doesn’t work. I created a helper (Number, 0, Input field) and added the entity to my graph card. It shows up as a separate graph on the same card, so it won’t change the scale of my real graph.

Here’s a fix

There’s a solution now