mini-graph-card icon indicating copy to clipboard operation
mini-graph-card copied to clipboard

feat: add a multiplier to replace the potentially confusing value_factor

Open mflagler opened this issue 3 years ago • 7 comments

Scaling values using the value_factor is too difficult. This should simply be a multiplier, not a factor/exponent of 10 that you want to scale values by. For converting MB to GB or GB to MB it makes it much easier, and for anything that is scaled by 10s then you just multiply by the factor of 10, 100, or 0.1, or 0.01 and it's plain and simple. There should be a pre-scale offset and a post-scale offset for anyone wanting to convert temps between C and F. Then you could pretty much convert between any units anyone should ever need.

mflagler avatar Apr 15 '21 18:04 mflagler

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this is still an active issue, please let us know!

stale[bot] avatar Feb 06 '22 22:02 stale[bot]

Still an active issue, got it! Removing stale label.

stale[bot] avatar Feb 11 '22 17:02 stale[bot]

In the Docs: image

IMHO the value_factor should be ANY number [-xxx.xxx, +xxx.xxx]. Values like "0.9, 0.5, 0.04" should scale the state down. Values like "1.2, 25, 400.56" should scale the state up. Negative values should make the state negative.

Also, should be specified per-entity - https://github.com/kalkih/mini-graph-card/issues/607

ildar170975 avatar Feb 11 '22 17:02 ildar170975

We should add a simpler multiplier (or similar) property and deprecate value_factor to be removed at a later date (also see #608)

jlsjonas avatar Feb 14 '22 11:02 jlsjonas

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this is still an active issue, please let us know!

stale[bot] avatar Apr 15 '22 18:04 stale[bot]

Yeah, i also need that.

Having costs per kWh and a cost average for the last hour. So the line of costs per kWh is so small that you can not see any changes in the cent-values, so i have to multiply that bei 5 times, so i can see the price changes in the chart.

RcRaCk2k avatar May 01 '22 20:05 RcRaCk2k

I was also looking for this as I have a forecasted solar radiation in W/m2, and it needed to be multiplied by a factor of 15.57 to equate to the same power as the area of my solar panels. Was looking to have a 'value_factor: 15.57' for that entity.

Danie10 avatar Aug 22 '22 10:08 Danie10