mini-graph-card
mini-graph-card copied to clipboard
[FEATURE REQUEST] use offset in lower/upper bound
Can you please add the option to have an offset in variable lower_bound or upper_bound? Sometimes the graph is too close to the border of the button, so I would like to shift it a bit. Defining a constant value (like 22.4 (%)) is not ok, as the humidity can vary in a huge range which could flatten the graph too much (like this happened in this case):

Using a string like: lower_bound: "[[[ return states['sensor.kitchen_humidity_min_over_last_24_hours'].state - 2.5 ]]]" could help, but defining a statistical sensor for all the rooms and measured values is very painful. So from this:

I would like to go to something like this:

With a value formatted like ˇ2.5 (example prefix; take the min value of the used period (52.2)and lower it by 2.5) it could be achieved. Thank you.
Have you tested a min_bound_range option?
It may help you to achieve your goal.
Have you tested a
min_bound_rangeoption? It may help you to achieve your goal.
Yes, but in this case I have to maintain a min value for everything if I want to use that value for the offset. For example: my kitchen temperature varies between 20 and 22 degrees for the last 24 hours, I need to take the min value and considering 3 degrees offset, I need to set the min_bound_range to "min(kitchen temperature) - offset" (so min(20...22) - 3 = 17). Having the offset option would simplify things of creating tens of new statistical sensors. Or do you have a better idea? Thanks in advance.
- Have you tried to NOT specify
lower_bound? Then the graph will use min & max values. - If you really need a proposed functionality - I would suggest you to prepare a complete algorithm for this functionality. Nobody will do it except you). The algorithm should be as detailed as possible. Also, please read this.