Closed commentsonly closed 1 year ago
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (sensor
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
sensor documentation sensor source (message by IssueLinks)
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
@jesserockz , Can this be re-opened please? Either the CCS811 sensor needs to be fixed to output valid units, or Home Assistant needs to be updated to allow ppb.
I disagree, the CCS811 outputs valid units. I think my adjustment in this issue makes sense and perhaps we could just update the esphome docs?
ESPHome components should always use one of the unit_of_measurement
that Home Assistant considers valid for the device_class
. This component (and others) don't meet that requirement, so either the ESPHome component needs to be fixed (b changing unit_of_measurement
or device_class
) or Home Assistant needs to be fixed.
You solution is fine, i.e. multiplying to get "ug/m3", but it's not acceptable that you have to fix it manually. It needs to be valid and consistent out-of-the-box.
If the solution is to change the output to "ug/m3", then there could be a separate output in "ppb", but the device class would have to be different.
ESPHome components should always use one of the
unit_of_measurement
that Home Assistant considers valid for thedevice_class
. This component (and others) don't meet that requirement, so either the ESPHome component needs to be fixed (b changingunit_of_measurement
ordevice_class
) or Home Assistant needs to be fixed.You solution is fine, i.e. multiplying to get "ug/m3", but it's not acceptable that you have to fix it manually. It needs to be valid and consistent out-of-the-box.
If the solution is to change the output to "ug/m3", then there could be a separate output in "ppb", but the device class would have to be different.
I dont think the 2 projects are as coupled as you are implying them to be. What about someone using esphome who doesnt care about or use homeassistant? (I know about who "owns" the project but my point is still valid)
Sure. There's no hard dependency between the projects so you can use them separately, but they should follow the same specification.
Aside from the fuzziness of assuming a generalized molar mass for VOCs, 4.5 is probably going to be on the high side for your average home VOC. A conversion of 4.5 indicates a pretty beefy molecule as far as the most common VOCs are concerned. The most common VOCs are going to be fuels, monocyclic aromatics, acetone and other paint-related chemicals, NOx, SOx, etc.
For instance, if your house or water heater use natural gas and you're measuring near your furnace or water heater, I'd be much more concerned with methane (and to a lesser extent, ethane and propane). These have molar masses significantly lower (16-44 g/mol, with the vast majority in the 16-20 g/mol range) than the ~100 g/mol a conversion factor of 4.5 assumes. NOx and SOx given off by a gas range or gas-fueled furnace or water heater will be closer to (45-65 g/mol).
That is to say, all of this is going to depend on what you're expecting to encounter. If you're in the garage, maybe you will be closer to the 100 g/mol range given the chemicals often found there. If you're in the kitchen, basement, or near the utility room, you're probably going to be closer to the 20-40 g/mol range.
Reading into the documentation of these sensors, these are all highly correlated with the calibration gas and how (or if) the sensor self-calibrates over time. For instance, the Airthings Wave Plus uses a metal-oxide sensor which basically self-calibrates to whatever the background VOC concentration is because of how the (their?) MOX sensor works. Over time it will use the background concentration of VOCs as your reference point. I wouldn't use a raw ppb or ug/m3 reading and make decisions based on action levels established by the EPA or other governmental agencies.
That said, I'd still suggest adopting ppb/ppm as valid units in Home Assistant. Both these and ug/m3 are valid measurements depending on how the sensor measures VOCs, how its calibrated, and how it reports back to the end user. Adopting ppb/ppm would also remove any additional error introduced by assuming a molar mass.
My $0.02.
The problem
Entity sensor.esp8266xxxxx_ccs811_tvoc (<class 'homeassistant.components.esphome.sensor.EsphomeSensor'>) is using native unit of measurement 'ppb' which is not a valid unit for the device class ('volatile_organic_compounds') it is using; Please update your configuration if your entity is manually configured, otherwise create a bug report
Well dead easy: ESPhome.io says: tvoc (Required): The information for the total volatile organic compound sensor in parts per billion (ppb).
And I'm well aware that ppb is an as legitimate unit as ppm, but tvocs are normally using ppb since that fits best.
What version of Home Assistant Core has the issue?
2023.1.1
What was the last working version of Home Assistant Core?
the one before
What type of installation are you running?
Home Assistant OS
Integration causing the issue
ESPhome
Link to integration documentation on our website
https://esphome.io/components/sensor/ccs811.html
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response