Skip to content
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

Storage of % and ppm values #12

Closed
amandel opened this issue Jan 27, 2024 · 2 comments
Closed

Storage of % and ppm values #12

amandel opened this issue Jan 27, 2024 · 2 comments

Comments

@amandel
Copy link
Contributor

amandel commented Jan 27, 2024

I'm not sure if this is an issue in the ESPHome binding or with the badges. I'm using OpenHAB 4.1.0.

I've noticed that percentage values are stored in the database in the value range of 0-1 (1% == 0.01) as well as ppm values (1 ppm = 1×10^-6 = 0.00001). The badges seem to expect values in the range of 0-100 for percentages. This leads to a humidity display of 0 for values between 0-49% and 1 for values of 50% or above.

The first question would be, who is acting incorrectly? I tried to figure this out, but it might also have changed with the type system changes. Can someone help?

grafik

@seime
Copy link
Owner

seime commented Jan 28, 2024

Here is one that I am using for humidity:

Number:Dimensionless Ventilation_Hybel_Bad_Humidity "Hybelventilasjon bad fukt" <humidity> {unit="%",channel="esphome:device:loft:bad_humidity"}

Corresponding esphome config for this channel:

  - platform: bme680_bsec
    bme680_bsec_id: bme680_bad
...
    humidity:
      name: "Bad Humidity"
      filters:
        - median
CleanShot 2024-01-28 at 16 46 29@2x

Could it be that the unit definition isn't present on the item metadata?

If unit is present, please provide DEBUG logs from the binding starting from connect and until first values returned (just a few secs)

@amandel
Copy link
Contributor Author

amandel commented Jan 28, 2024

Thanks! I also use a BME680 and there was in fact no 'Unit' defined, I've added '%' and 'ppm' now the card looks like expected:
grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants