esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 36 forks source link

Incorrect device_class for sgp4x #4047

Closed alexd321 closed 1 year ago

alexd321 commented 1 year ago

The problem

Nox and voc are unitless for sgp40 sensor as they are air quality indexes. Need to update device_class

Which version of ESPHome has the issue?

2022.12.3

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2023.1.5

What platform are you using?

ESP8266

Board

NodeMCUv2

Component causing the issue

sgp4x

Example YAML snippet

sensor:
  - platform: sgp4x
    voc:
      name: "Living Room VOC Index"
      #device_class: aqi

    nox:
      name: "Living Room NOx Index"
      #device_class: aqi
    update_interval: 5min

Anything in the logs that might be useful for us?

Home assistant errors

Entity sensor.living_room_voc_index (<class 'homeassistant.components.esphome.sensor.EsphomeSensor'>) is using native unit of measurement 'None' 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 at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+esphome%22
Entity sensor.living_room_nox_index (<class 'homeassistant.components.esphome.sensor.EsphomeSensor'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('nitrous_oxide') it is using; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+esphome%22

Additional information

No response

alexd321 commented 1 year ago

working in dev