# \[Matter\] Add support for VOCs

**URL:** <https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618>\
**Category:** Demandes livrées\
**Tags:** matter\
**Created:** [June 23, 2025, 12:40pm UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618 "2025-06-23T12:40:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 23, 2025, 12:40pm UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/1 "2025-06-23T12:40:07Z")

</div>

**Description**

Manage VOC sensors in the Matter integration

---

<div class="post-metadata">

**Author:** ![mutmut](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/mutmut/32/14064_2.png) [@mutmut](https://community.gladysassistant.com/u/mutmut)\
**Post date:** [June 23, 2025, 1:10pm UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/2 "2025-06-23T13:10:03Z")

</div>

![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/6/1/616221547f7f31aa247fb0b2d86f2a80a4e1083e.png)  
 ![IMG_5627B0AA9897-1](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/7/c/7c83e4d0d534b879ab4265845674d11bfe761e4d.jpeg)

---

<div class="post-metadata">

**Author:** ![Nagromdark](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/nagromdark/32/17758_2.png) [@Nagromdark](https://community.gladysassistant.com/u/Nagromdark)\
**Post date:** [October 2, 2025, 7:04am UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/3 "2025-10-02T07:04:13Z")

</div>

FYI, I’m on it!

---

<div class="post-metadata">

**Author:** ![Nagromdark](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/nagromdark/32/17758_2.png) [@Nagromdark](https://community.gladysassistant.com/u/Nagromdark)\
**Post date:** [October 2, 2025, 8:30am UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/4 "2025-10-02T08:30:27Z")

</div>

@mutmut, should I use this Dyson scale? What do you think?

---

<div class="post-metadata">

**Author:** ![Nagromdark](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/nagromdark/32/17758_2.png) [@Nagromdark](https://community.gladysassistant.com/u/Nagromdark)\
**Post date:** [October 2, 2025, 11:31am UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/5 "2025-10-02T11:31:46Z")

</div>

🙂

> <https://github.com/GladysAssistant/Gladys/pull/2358>
>
> \### Pull Request check-list
> 
> To ensure your Pull Request can be accepted as fa…st as possible, make sure to review and check all of these items:
> 
> \- \[X\] If your changes affects code, did your write the tests?
> \- \[X\] Are tests passing? (\`npm test\` on both front/server)
> \- \[X\] Is the linter passing? (\`npm run eslint\` on both front/server)
> \- \[X\] Did you run prettier? (\`npm run prettier\` on both front/server)
> 
> 
> \### Description of change
> 
> \<img width="406" height="225" alt="image" src="https://github.com/user-attachments/assets/9de2a3e1-48dc-45ec-a5c5-b7683dd03ef1" /\>

---

<div class="post-metadata">

**Author:** ![mutmut](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/mutmut/32/14064_2.png) [@mutmut](https://community.gladysassistant.com/u/mutmut)\
**Post date:** [October 2, 2025, 12:50pm UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/6 "2025-10-02T12:50:11Z")

</div>

The VOCs appear to be unitless on the Dyson but in µg/m³ or kPa on other sites, and that depends on the type of VOC being analyzed.  
I’d say we should go with the Dyson scale, in the absence of an official global scale.

---

<div class="post-metadata">

**Author:** ![Nagromdark](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/nagromdark/32/17758_2.png) [@Nagromdark](https://community.gladysassistant.com/u/Nagromdark)\
**Post date:** [October 2, 2025, 1:00pm UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/7 "2025-10-02T13:00:24Z")

</div>

Yes, it doesn’t use a unit and matterbridge uses the LevelValue attribute, and there is an enum in matter.js with low, medium, high and critical. I will find the mapping in Gladys for displaying the colors.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [October 3, 2025, 7:39am UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/8 "2025-10-03T07:39:24Z")

</div>

@Nagromdark your PR isn’t final, I imagine?

Be careful — I think you’re modifying a behavior we have in Gladys:

 ![Screenshot 2025-10-03 at 09.38.04](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/d/f/dfdc12ea3654bac21e045e0418c07d18936171c4.png)

If indeed the Dyson doesn’t return the VOC value, but just a VOC scale, create a new feature specifically for that 🙂

---

<div class="post-metadata">

**Author:** ![Nagromdark](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/nagromdark/32/17758_2.png) [@Nagromdark](https://community.gladysassistant.com/u/Nagromdark)\
**Post date:** [October 3, 2025, 8:39am UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/9 "2025-10-03T08:39:47Z")

</div>

I’m not entirely in agreement 😊  
Actually, there already is a VOC\_SENSOR feature with which you have a unit of measurement (when you look at the MQTT devices, for example)  
And the VOC\_INDEX\_SENSOR feature, as its name indicates, is an index so there’s no unit, so getVocIndexColor was weird. Maybe we should find out in which context it was added

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [October 3, 2025, 8:50am UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/10 "2025-10-03T08:50:26Z")

</div>

If you look at where the «&nbsp;VOC\_INDEX\_SENSOR&nbsp;» feature is used, you can see that it’s used by Zigbee2mqtt via the «&nbsp;voc\_index&nbsp;» feature which is used by this device:

> **[IKEA E2112 control via MQTT | Zigbee2MQTT](https://www.zigbee2mqtt.io/devices/E2112.html)**
>
> Integrate your IKEA E2112 via Zigbee2MQTT with whatever smart home infrastructure you are using without the vendor's bridge or gateway.

I have it at home and it indeed sends a VOC value between 1 and 500, which corresponds to Sensirion’s VOC Index, which is a VOC index a bit different from a raw concentration value:

> **[Info\_Note\_VOC\_Index.pdf](https://sensirion.com/media/documents/02232963/6294E043/Info_Note_VOC_Index.pdf)**
>
> 300.38 KB

So it’s indeed something defined and different from a standard VOC value.

I think we’ll need to create a 3rd feature 😄

---

<div class="post-metadata">

**Author:** ![Nagromdark](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/nagromdark/32/17758_2.png) [@Nagromdark](https://community.gladysassistant.com/u/Nagromdark)\
**Post date:** [October 3, 2025, 8:53am UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/11 "2025-10-03T08:53:21Z")

</div>

Oh damn, how am I going to name this, VOC\_INDEX\_SENSOR\_2 lol😂

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [October 3, 2025, 9:07am UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/12 "2025-10-03T09:07:21Z")

</div>

I think your case is so specific that you shouldn’t hesitate to name it VOC\_DYSON\_INDEX\_SENSOR ^^

Or something related to Matter — is it related to Matter or Dyson here?

---

<div class="post-metadata">

**Author:** ![Nagromdark](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/nagromdark/32/17758_2.png) [@Nagromdark](https://community.gladysassistant.com/u/Nagromdark)\
**Post date:** [October 3, 2025, 9:09am UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/13 "2025-10-03T09:09:14Z")

</div>

It’s more related to matter, because it’s an enum.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [October 3, 2025, 9:14am UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/14 "2025-10-03T09:14:49Z")

</div>

Indeed, in the case of the Dyson, the featureMap has «&nbsp;numericMeasurement: false&nbsp;», so it’s really just a scale specific to Matter. Still need to check in the Matter spec whether it’s a standard scale or if they pulled it out of their hat 😃

If it’s really a non-standard Matter feature, put «&nbsp;MATTER&nbsp;» in the feature name — I don’t mind.

---

<div class="post-metadata">

**Author:** ![Nagromdark](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/nagromdark/32/17758_2.png) [@Nagromdark](https://community.gladysassistant.com/u/Nagromdark)\
**Post date:** [October 3, 2025, 12:07pm UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/15 "2025-10-03T12:07:09Z")

</div>

I’ve pushed again, tell me if it’s OK.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [October 3, 2025, 12:14pm UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/16 "2025-10-03T12:14:08Z")

</div>

Thanks!

Question: Is «&nbsp;LevelValue&nbsp;» a generic Matter value, potentially used for other sensors? Is it specific to VOCs?

Another question: why display the number coming from Matter in the badge? That doesn’t mean anything to the user.

In my opinion, we should display a text, like what’s done for:

```auto
const BADGE_VALUE_CONVERTERS = {
  [DEVICE_FEATURE_CATEGORIES.RISK]: {
    0: 'no-risk',
    1: 'low-risk',
    2: 'medium-risk',
    3: 'high-risk'
  }
};

```

Besides, we could reuse that approach.

---

<div class="post-metadata">

**Author:** ![Nagromdark](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/nagromdark/32/17758_2.png) [@Nagromdark](https://community.gladysassistant.com/u/Nagromdark)\
**Post date:** [October 3, 2025, 12:31pm UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/17 "2025-10-03T12:31:39Z")

</div>

> [@pierre-gilles](#):
>
> Is this specific to VOCs?

No, it’s not specific to VOCs; it’s also used for NO2, for example.

I’m looking to make it more generic and also for the text to display.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [October 3, 2025, 12:43pm UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/18 "2025-10-03T12:43:14Z")

</div>

> [@Nagromdark](#):
>
> No, it’s not specific to VOC; it’s also used for NO2, for example.

Ok, however I’d like the category to remain specific to VOC, so that Gladys «&nbsp;knows&nbsp;» we’re talking about VOC, it’s useful later for integrations and for Gladys’ AI 🙂

---

<div class="post-metadata">

**Author:** ![Nagromdark](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/nagromdark/32/17758_2.png) [@Nagromdark](https://community.gladysassistant.com/u/Nagromdark)\
**Post date:** [October 4, 2025, 4:32pm UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/19 "2025-10-04T16:32:06Z")

</div>

Is this better:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/a/5/a55388d97c915668660f2bc9911ab51f3dc08cff.png)

For the feature name I’m not sure:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/e/4/e4e5c75c6125c050aef697635b74d000e242092d.png)

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [October 6, 2025, 7:32am UTC](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618/20 "2025-10-06T07:32:52Z")

</div>

> [@Nagromdark](#):
>
> Is this better:

Yes, it’s much better 🙂

However, where does the translation «&nbsp;low&nbsp;» come from? I don’t see it in the PR code.

> [@Nagromdark](#):
>
> For the feature name I’m not sure:

Not sure the user needs to know that it’s a special Matter index.

We could give it a simple name «&nbsp;VOC Index&nbsp;», and rename the other index to call it «&nbsp;Sensirion VOC index&nbsp;» / «&nbsp;Sensirion VOC Index&nbsp;» to better represent reality, for example.

What do you think?

[Next page](https://community.gladysassistant.com/t/matter-ajouter-la-gestion-des-cov/9618.md?page=2)
