esphome icon indicating copy to clipboard operation
esphome copied to clipboard

Add AGS10 Sensor

Open mak-42 opened this issue 1 year ago • 3 comments

Add support for AGS10 VOC Sensor.

Types of changes

  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Other

Related issue or feature (if applicable): fixes

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#3527

Test Environment

  • [x] ESP32
  • [ ] ESP32 IDF
  • [ ] ESP8266
  • [ ] RP2040
  • [ ] BK72xx
  • [ ] RTL87xx

Example entry for config.yaml:

    i2c:
      sda: GPIO21
      scl: GPIO22
      scan: true
      frequency: 15kHz

    sensor:
      - platform: ags10
        tvoc:
          name: "TVOC"
        address: 0x1A
        update_interval: 60s

Checklist:

  • [x] The code change is tested and works locally.
  • [x] Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

mak-42 avatar Jan 10 '24 07:01 mak-42

Hey there @mak-42, Thanks for submitting this pull request! Can you add yourself as a codeowner for this integration? This way we can notify you if a bug report for this integration is reported. In __init__.py of the integration, please add:

CODEOWNERS = ["@mak-42"]

And run script/build_codeowners.py

(message by NeedsCodeownersLabel)

probot-esphome[bot] avatar Jan 10 '24 07:01 probot-esphome[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 53.80%. Comparing base (4d8b5ed) to head (4d7adce). Report is 40 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #6070      +/-   ##
==========================================
+ Coverage   53.70%   53.80%   +0.09%     
==========================================
  Files          50       50              
  Lines        9408     9445      +37     
  Branches     1654     1661       +7     
==========================================
+ Hits         5053     5082      +29     
  Misses       4056     4056              
- Partials      299      307       +8     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jan 10 '24 07:01 codecov-commenter

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:

Learn more about our pull request process.

esphome[bot] avatar Jan 18 '24 08:01 esphome[bot]