-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
TVOC sensor logs warning while using valid units #85170
Comments
VOC now only support µg/m³. To fix that, removed device_class to None. See also: https://github.com/home-assistant/core/blob/71ce7373a3e8cb267716f371e8a648595bf02f29/homeassistant/components/sensor/__init__.py#L541-L543 home-assistant/core#85170
VOC now only support µg/m³. To fix that, removed device_class to None. See also: https://github.com/home-assistant/core/blob/71ce7373a3e8cb267716f371e8a648595bf02f29/homeassistant/components/sensor/__init__.py#L541-L543 home-assistant/core#85170
Hi there, I have the same warning in the logs as you mentioned. Seems these errors used to happen in the background but never shown in the log file, until the last release of the Home Assistant 2023.01. SO basically I use SGP30 sensor and I found in it's documentation that there is a possibility to convert from ppb to µg/m³ but again it is an approximate value as these are gasses and their density/volume changes on a lot of variables. So I guess I could convert to µg/m³ and call it solved. :) I connect SGP30 TVOC sensor with ESPHome to HomeAssistant. As per ESPHome coding the measured values are in ppb units of measurements. And this sensor is automatically classified by ESPHome as "device_class: volatile_organic_compound That is totally fine and expected. I checked HomeAssistant units of measurements and I cannot see any ppb. So this unit of measurements is not defined in HomeAssistant. I would say there is a gap here for this unit of measurement ppb, between ESPhome and HomeAssistant. |
The context has always been there, device classes have always been limited to a set of units that are supported for those device classes. https://www.home-assistant.io/integrations/sensor#device-class The only thing changed this release, is that we added check and warnings for cases that didn't match those as documented and supported.
That is the ESPHome project, they have their own issue trackers. Please raise an issue there.
That message is correct, ppb isn't supported. As this is an upstream issue at this point, I'll go ahead and close this issue on this end. ../Frenck |
I disagree that this is an upstream issue. All of my findings show that tvoc can have a unit of ppb and this is an issue with a too restrictive device class in HA @frenck I simply linked the upstream code for reference |
The problem
In my logs after upgrading to 2023.1.0 I see the following log message
In #84371 @frenck mentioned that µg/m³ is the only accepted unit for this class, I was wondering if there was more context for this and where I should go to resolve this.
Here is where the units are being set in esphome for this device
https://github.com/esphome/esphome/blob/dev/esphome/components/ccs811/sensor.py#L43
All googling I have done seem like ppb is valid for TVOC
https://learn.kaiterra.com/en/resources/understanding-tvoc-volatile-organic-compounds
All spec sheets I find for the ccs811 also list ppb as the units
What version of Home Assistant Core has the issue?
core-2023.1.0
What was the last working version of Home Assistant Core?
core-2022.12.9
What type of installation are you running?
Home Assistant Core
Integration causing the issue
esphome
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: