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
[BUG] utility_meter shows to much decimals #41234
Comments
Well that error is not normal (Invalid state) and it is caused by the source sensor (sensor.garten_regenmenge) that has an empty string in the topic, your should fix that in the sensor. About the decimals, python is very tricky about this... you probably received a value in that mqtt topic with a very high precision (or simply an error that was poorly interpreted by python when converting to a decimal), the system will propagate that precision indefinitely... |
The source sensor only can increase by 0.3. So possible values are always like: 0.0, 0.3, 0.6, 0.9, 1.2, 1.5, 1.8, 2.1, ... and so on. |
I understand your viewpoint, and you expect that to happen. But the errors:
tell me otherwise... even if sporadically, there is something strange with your sensor. From the MQTT topic "rtl_433" I take it you are receiving this from a weather station over a 433Mhz radio link. These links are prone to errors, usually besides the weather readings there is usually also a checksum field that can be used to validate that the received information is correct (well at least with my Chinese no brand weather station :) ) |
I'm not so sure about rtl-433, I use a diy decoder based on an Arduino (https://github.com/dgomes/homeGW) in my code I do handle the CRC before publishing into the MQTT broker. So my configuration is very similar to yours. I also have a issues with values that are properly transmitted but make no sense! for that I use the filter integration https://www.home-assistant.io/integrations/filter/ Here's my configuration to filter bad values from my weather station:
Your template will fix some errors, but not those outliers that happen not too often. |
The problem
Utility_meter does show too much decimals (5 in my case). This wasn't the case before.
The input sensor the utility_mater's are based on does have onle 1 decimal as the smalles amount of rain it can detect is 0.3mm.
This doesn't make sense and it wasn't the case as I configured lovelace some weeks ago. The issue began this week.
utility_meter is based on this sensor:
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
I don't know if this error has to do with this as I use utility_meter for other measurements/sensors too (e.g. power meters).
Additional information
The text was updated successfully, but these errors were encountered: