kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.99k stars 233 forks source link

fix wrong default value for value_factor in README.md #1041

Closed schmocker closed 10 months ago

schmocker commented 10 months ago

the default value for the parameter value_factor is documented as 0. But I think it should be 1.

ildar170975 commented 10 months ago

This is not correct. The value of value_factor is used here: https://github.com/kalkih/mini-graph-card/blob/210fb4c2ccdc3fe4ec95e9f6d82eb4e220405a5a/src/main.js#L695 i.e. 0 value gives 1.

ildar170975 commented 10 months ago

@schmocker Do not get disappointed & keep improving the mini-graph-card ))

schmocker commented 10 months ago

@ildar170975 oh ok I see, you are correct. Well that it's even more confusing since this is not a 'factor' but actually an 'exponent' which together with base 10 builds the actual factor. I would recommend to let the users define the factors directly (not the exponent) or rename it into something like value_factor_exponent and explain it a bit better.

ildar170975 commented 10 months ago

I would recommend to let the users define the factors directly (not the exponent) or rename it into something like value_factor_exponent and explain it a bit better.

You are right, could be confusing. Check https://github.com/kalkih/mini-graph-card/issues/591