jason0x43 / hacs-hubitat

A Hubitat integration for Home Assistant
MIT License
196 stars 48 forks source link

[enhancement] Support Air Quality device #117

Open mindtripper opened 3 years ago

mindtripper commented 3 years ago

First off. This is an awesome component. And I am using it for multiple Zigbee and ZWave devices.

I have recently bought a "cheap" EUROTRONIC Air Quality sensor that measures VOC and CO2: https://www.amazon.co.uk/Eurotronic-700088-Luftg%C3%BCtesensor-Recommendation-Einzelartikel/dp/B08FJ5FY67

Adding this to Hubitat, and then exposing it to HA only provides Humidity and Temperature. Which is to be expected based on the readme of this component.

So, the question is. Can you add support for more sensors. VOC and CO2? And if possible Dewpoint, HomeHealth, VOC-Level and carbonDioxide-Level :)

Providing as much detail as I can below if you choose to add support.

Driver used: Eurotronic Air Quality Sensor by syepes: https://github.com/syepes/Hubitat/blob/master/Drivers/Eurotronic/Eurotronic%20Air%20Quality%20Sensor.groovy

Technical documentation: https://eurotronic.org/wp-content/uploads/2021/03/Air-Quality-Sensor-Z-Wave-Plus_BDA-Web.pdf

Device provides the following in Hubitat UI when setup:

Current States
DewPoint : 3.7
HomeHealth : Good
VOC : 0.539
VOC-Level : Outstanding
carbonDioxide : 811
carbonDioxide-Level : Mediocre
humidity : 23.50
temperature : 26.20

Maker shares the following JSON about the device:

{
  "id": "40",
  "name": "Eurotronic Air Quality Sensor",
  "label": "AirQuality01",
  "type": "Eurotronic Air Quality Sensor",
  "attributes": [
    {
      "name": "carbonDioxide-Level",
      "currentValue": "Good",
      "dataType": "ENUM",
      "values": ["Good", "Mediocre", "Bad", "Harmful", "Risk"]
    },
    {
      "name": "HomeHealth",
      "currentValue": "Good",
      "dataType": "ENUM",
      "values": ["Good", "Mediocre", "Harmful", "Risk"]
    },
    { "name": "VOC", "currentValue": 0.464, "dataType": "NUMBER" },
    { "name": "temperature", "currentValue": 26.2, "dataType": "NUMBER" },
    { "name": "humidity", "currentValue": 23.9, "dataType": "NUMBER" },
    { "name": "carbonDioxide", "currentValue": 689, "dataType": "NUMBER" },
    {
      "name": "VOC-Level",
      "currentValue": "Outstanding",
      "dataType": "ENUM",
      "values": ["Outstanding", "Good", "Mediocre", "Bad", "Harmful", "Risk"]
    },
    { "name": "DewPoint", "currentValue": 3.9, "dataType": "NUMBER" }
  ],
  "capabilities": [
    "RelativeHumidityMeasurement",
    { "attributes": [{ "name": "humidity", "dataType": null }] },
    "Configuration",
    "Actuator",
    "Refresh",
    "Polling",
    "Initialize",
    "CarbonDioxideMeasurement",
    { "attributes": [{ "name": "carbonDioxide", "dataType": null }] },
    "TemperatureMeasurement",
    { "attributes": [{ "name": "temperature", "dataType": null }] },
    "Sensor"
  ],
  "commands": ["clearState", "configure", "initialize", "poll", "refresh"]
}
jason0x43 commented 3 years ago

New sensor types are pretty easy to add. Thanks for providing the device info -- that's helpful, because not every device follows Hubitat's capabilities spec 😄.