"PPB" unit lost in home assistant after re-pair of Frient AQZSB sensor

Some time ago I experimented with the DDF of the Frient AQSZB sensor (this one) to see whether the reporting rate could be brought down a bit. Because the outcome was not very successful (no change in reporting rate visible for whatever reason), I reverted to the “original” DDF in the current release. I did multiple re-pairs during this process.

I noticed afterwards that the “PPB” unit entry in home assistant was gone:
image

What could be the reason for that, was there possibly a change in the deCONZ home assistant integration which could cause this issue?

The API output looks like it should to me:

{
    "config": {
        "battery": 100,
        "on": true,
        "reachable": true
    },
    "ep": 38,
    "etag": "13f5efa8d5a12de4de89e43fe089d9dc",
    "lastannounced": "2022-11-20T04:17:57Z",
    "lastseen": "2022-11-20T08:54Z",
    "manufacturername": "frient A/S",
    "modelid": "AQSZB-110",
    "name": "AQSZB-110",
    "state": {
        "airquality": "excellent",
        "airqualityppb": 42,
        "lastupdated": "2022-11-20T08:54:31.213"
    },
    "swversion": "4.0.1",
    "type": "ZHAAirQuality",
    "uniqueid": "00:15:bc:00:36:00:0f:8e-26-fc03"
}

@Robban Perhaps you can shed some light on this :)?

It was pointed out that the specific device type used for PPB shouldn’t have a unit of measurement to it Improve deCONZ sensor classes by Kane610 · Pull Request #79137 · home-assistant/core · GitHub

Thanks Robban, this specific sensor reports VOC via VOC Measurement Cluster. Should this measurement then mapped to device class volatile_organic_compounds instead of AQI?

Yeah, maybe I added the wrong device class. In that case it would be correct to change it.

I think the mismatch comes from the fact that deconz reports the VOC measurement cluster of the device as “state/air_quality_pbb” in a ZHAAirQuality sub-device:
image

Ideally, it should be reported as “state/voc_ppb” instead and then mapped to device class volatile_organic_compounds in home assistant. Unfortunately, “state/voc_ppb” does not exist as an option. I guess this means that also some change on deconz itself would be needed, or alternatively, “airqualityppb” would be (mis-)used.

Not sure how to proceed from here, it would be great if somebody with more insights could have a look.

A simple new PR that changes this :slight_smile:

1 Like

PR is up Fix deCONZ Air Quality PPB device class and unit of measurement by Kane610 · Pull Request #82726 · home-assistant/core · GitHub

1 Like