Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grove Multichannel Gas Sensor V2 NO2 sensor not recognized failed to compile #6393

Open
orbital253 opened this issue Nov 1, 2024 · 2 comments · May be fixed by esphome/esphome-docs#4527
Open

Comments

@orbital253
Copy link

The problem

I got Grove Multichannel Gas Sensor V2 and i used the example code

sensor:
  - platform: grove_gas_mc_v2
    no2:
      id: precal_no2
      name: "Nitrogen Dioxide"
    ethanol:
      name: "Ethanol"
    carbon_monoxide:
      name: "Carbon Monoxide"
    tvoc:
      name: "Volatile Organic Compounds"

but when i try to compile it i get the error

INFO ESPHome 2024.10.2
INFO Reading configuration /config/esphome/airquality.yaml...
Failed config

sensor.grove_gas_mc_v2: [source /config/esphome/airquality.yaml:57]
  platform: grove_gas_mc_v2
  
  [no2] is an invalid option for [sensor.grove_gas_mc_v2]. Please check the indentation.
  no2: 
    id: precal_no2
    name: Nitrogen Dioxide
  ethanol: 
    id: precal_ethanol
    name: Grove Ethanol
  carbon_monoxide: 
    id: precal_co
    name: Grove Carbon Monoxide
  tvoc: 
    id: precal_tvoc
    name: Grove Volatile Organic Compounds

i have another i2c device with the same indentation that works ok. when i comment out the no2 code compiles correctly

Which version of ESPHome has the issue?

2024.10.2

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.10.4

What platform are you using?

ESP32

Board

Lillygo T7

Component causing the issue

Grove Multichannel Gas Sensor V2

Example YAML snippet

sensor:
  - platform: grove_gas_mc_v2
    no2:
      id: precal_no2
      name: "Nitrogen Dioxide"
    ethanol:
      id: precal_ethanol
      name: "Grove Ethanol"
    carbon_monoxide:
      id: precal_co
      name: "Grove Carbon Monoxide"
    tvoc:
      id: precal_tvoc
      name: "Grove Volatile Organic Compounds"

Anything in the logs that might be useful for us?

No response

Additional information

No response

@ppussar
Copy link

ppussar commented Dec 3, 2024

This configuration works for me:

sensor:
  - platform: grove_gas_mc_v2
    nitrogen_dioxide:
      name: "Nitrogen Dioxide"
    ethanol:
      name: "Ethanol"
    carbon_monoxide:
      name: "Carbon Monoxide"
    tvoc:
      name: "Volatile Organic Compounds"

The documentation seems to be outdated.

@orbital253
Copy link
Author

@ppussar You are correct the documentation is outdated. it works ok with your settings

ppussar pushed a commit to ppussar/esphome-docs that referenced this issue Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants