New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure decimal places for entities #492
Comments
Not sure why you have different precisions for the power sensors. What happens when they have a non 0 value? Why do you want different precision for the energy sensor? I don't see an issue to have this at 4 decimals. |
@PhillyGilly Did you see my questions? |
Hi @bramstroker. 1. I have only seen this with zero values. 2.The powercalc sensors are cut and paste clones. 3. Two thoughts on using 4 decimal places a) the precision implies accuracy that isn't being achieved, b) I was taught that in the metric system with Greek prefixes used the maximum number of decimal places is three. So here, if we want to measure fractions of a Watt we should measure in Watts not kW. I will try to source that. |
Thanks for your answer and considerations. I will have a look into the 0 and 0.00 differences. My question was about which kind of powercalc sensors are this? lut, fixed or linear mode? Than I can see if I am able to reproduce this. About the energy sensor decimal places. There was an issue where this was discussed and changed. #104. |
Added option to configure precision #546. Has been released in v0.18.0-beta.1 |
I'll try that. Do I download specific files from the dev fork, copy into my config/subfolder and then restart HA? |
Did you use HACS to install? |
yes. I'm just upgrading to v0.17.0 |
You can click the three dots, than "redownload", and check the "Show beta versions" box. |
Thanks. I wasn't aware of that option
Which is great, but I'm still getting the power in varying precision.
So I have no idea why they display different precisions. |
Yes, I only did have a look yet at the energy sensors. Nothing has changed regarding the power sensors yet. It's a bit strange, particularly because you have similar configurations for both of them. |
I was able to reproduce some inconsistent roundings on my development instance. Now all my power sensors have 2 decimals. There are 20 more which didn't fit on this screenshot. Has been merged into the master branch. |
Also released in v0.18.0-beta.3 |
Awesome. Cool it's working as expected for you too. |
Hi @bramstroker |
I did not have a look into the utility meters. Will see if it's also possible to do for them. |
I have also added presicion for the utility meters. Are you able to test with v0.19.0-beta.1? |
I see you only have the issue with the sensors having exactly 0 kWh. This is from my development instance. I have tens of utility meters more, but just added some to lovelace dashboard. I also have a sensor which is 0 as you see, but that one is succesfully rounded to 0.000 kWh |
I am not sure how to fix this as I am unable to reproduce. |
Hi. I'm on 1.9.5 and latest HA core 2022.3.8. The problem is only with sensors that don't move off zero (they are in guest room). As soon as the devices switch on the correct precision is shown. |
@PhillyGilly I did have another look and was able to reproduce. Should be resolved now with latest master branch. Are you able to test? |
No, it's not yet released. Only on master branch. You can install that by clicking reinstall in HACS and enabling the check for "beta versions". |
Very strange. Maybe you could try with v0.19.2 which I just issued and also contains the fix. |
That’s it! Thank you. |
Would it be possible to configure the number of decimal places in entity configuration or globally?
I've got kWh showing the nearest 0.1W and different W precisions?
The text was updated successfully, but these errors were encountered: