Closed MallocArray closed 4 months ago
Hey there @airgradienthq, @joostlek, mind taking a look at this issue as it has been labeled with an integration (airgradient
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
airgradient documentation airgradient source (message by IssueLinks)
What would be a nice way to name the unit?
I'm not really familiar with the code behind HA integrations, but I believe in this section: https://github.com/home-assistant/core/blob/dev/homeassistant/components/airgradient/sensor.py#L103
It would be something like native_unit_of_measurement=UNIT_COUNT_DECILITRE
This is based on the PMS500x integration line here where it is unit_of_measurement=UNIT_COUNT_DECILITRE,
but since the values don't exactly match, I'm not sure what the proper value in a homeassistant side would be
https://github.com/esphome/esphome/blob/dev/esphome/components/pmsx003/sensor.py#L133C17-L133C57
Hmm, maybe we could rename the sensor to "particles with diameter >0.3um/dL air" and make the UoM "particles". I'm still not a big fan of it, but it would look a lot better, and more important, it's correct
@joostlek yes I think this is a good idea
I now made it:
Particles with diameter >0.3um
with unit: particles/dL air
I'm not a fan of it either. Why is the rename needed, vs just leaving it PM0.3 and letting the unit be particles/dL air
?
I lack a bit of knowledge about air quality here, but would PM0.3 indicate enough about the size?
Achim can speak more to it, but I've become familiar with PM2.5 meaning the size of particle being measured and PM0.3 still means the same thing, the size of the particle. The confusing thing is the unit of those particles being measured since it is different for PM0.3 compared to the others, but it is what the manufacturer is doing with the hardware, so I would lean towards still calling it PM0.3 and only changing the Unit label
The problem
Most values returned by this integration have the proper unit, but the
PM0.3 count
value does not return a unit, only a number.According to the spec sheets I've found, it "indicates the number of particles with diameter beyond 0.3 um in 0.1 L of air." Link below to a reference document
The ESPHome integration for the same sensor reports it as
/dL
and I believe it would be appropriate for this value to also be in dLI also think that the icon for this could be the same as the other PM sensors. This one uses
blur
and the others usemolecule
What version of Home Assistant Core has the issue?
2024.6.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
airgradient
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
https://www.aqmd.gov/docs/default-source/aq-spec/resources-page/plantower-pms5003-manual_v2-3.pdf