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

Wrong index with TS0601 with init µg/m³ #111

Closed
diveschumi opened this issue Feb 9, 2023 · 4 comments
Closed

Wrong index with TS0601 with init µg/m³ #111

diveschumi opened this issue Feb 9, 2023 · 4 comments
Assignees
Labels
waiting for feedback Further information is requested.

Comments

@diveschumi
Copy link

Hello,

could it be that I get a wrong index with my smart air house keeper TS0601, which has the following sensors:
CO2: ppm
Formaldehyd: µg/m³
Pm25: µg/m³
Voc: ppm
Temperature and Humidity

I think, the unit µg/m³ and ppm at Voc is the problem. When I generate new sensors with recalculation µg/m³ to mg/m³ and voc to mg/m³ the index seems to be right.

@diveschumi diveschumi changed the title Wrong index with Wrong index with TS0601 Feb 9, 2023
@diveschumi diveschumi changed the title Wrong index with TS0601 Wrong index with TS0601 with init µg/m³ Feb 9, 2023
twillux pushed a commit to twillux/ha-iaquk that referenced this issue Feb 9, 2023
…pprox-eq-4.0

Update pytest-cov requirement from ~=3.0 to ~=4.0
@Limych
Copy link
Owner

Limych commented Oct 1, 2023

@diveschumi
How do you do the calculation? By simply replacing the units with new ones or by mathematically converting the values into new units?

It will be useful if you enable debugging mode and publish logs here with the correct calculation and the incorrect one.
How to enable debug mode — see at the end of the README.

@Limych Limych self-assigned this Oct 1, 2023
@Limych Limych added the waiting for feedback Further information is requested. label Oct 1, 2023
@himekifee
Copy link

From the pdf in repo, the unit for TVOC and Formaldehyd seems to be mg/m^3. However, the default and only available unit for both device classed are ug/m^3. If manual set to mg/m^3, an error would be reported as follows

WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.tvoc (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'mg/m³' which is not a valid unit for the device class ('volatile_organic_compounds') it is using; expected one of ['µg/m³']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.hcho (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'mg/m³' which is not a valid unit for the device class ('volatile_organic_compounds') it is using; expected one of ['µg/m³']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22

So ideally, the calculation in the component needs to do a conversion first from ug/m^3 to mg/m^3.

@Limych Limych closed this as completed in 516b125 May 2, 2024
@himekifee
Copy link

Is this fixed? Seems still wrong to me. The sensor unit is ug/m^3.

@Limych
Copy link
Owner

Limych commented May 3, 2024

I haven't fixed this issue. I just closed it.
The author of the issue complained that units were being converted incorrectly. New tests have been added to the code. It guarantee that the conversion will now always be physically correct. This means that this issue no longer makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback Further information is requested.
Projects
None yet
Development

No branches or pull requests

3 participants