Skip to content

Add Tuya Gas Sensor _TZE204_uo8qcagc variant#4684

Open
kastakhov wants to merge 3 commits intozigpy:devfrom
kastakhov:add_TZE204_uo8qcagc
Open

Add Tuya Gas Sensor _TZE204_uo8qcagc variant#4684
kastakhov wants to merge 3 commits intozigpy:devfrom
kastakhov:add_TZE204_uo8qcagc

Conversation

@kastakhov
Copy link

Proposed change

Adds Tuya explosive gas detectors:

_TZE204_uo8qcagc

Additional information

Closes: #4162

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works
  • Device diagnostics data has been attached

Copilot AI review requested due to automatic review settings January 25, 2026 09:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for a new variant of Tuya gas sensor (_TZE204_uo8qcagc). The quirk extends the base Tuya gas alarm configuration with three additional entities: a preheat status indicator, a fault alarm sensor, and an alarm control switch.

Changes:

  • Added quirk definition for _TZE204_uo8qcagc gas sensor with specific data point mappings
  • Added test coverage for the new device variant

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
zhaquirks/tuya/tuya_gas.py Added QuirkBuilder configuration for the new gas sensor variant with three custom entities (preheat sensor, fault alarm, and alarm switch)
tests/test_tuya_gas.py Added test case entry for the new device model to verify gas detection functionality

@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.32%. Comparing base (40b41de) to head (b6b3b65).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #4684   +/-   ##
=======================================
  Coverage   92.32%   92.32%           
=======================================
  Files         371      371           
  Lines       12190    12191    +1     
=======================================
+ Hits        11254    11255    +1     
  Misses        936      936           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kastakhov
Copy link
Author

Hi @puddly, @TheJulianJES, could you check this PR?

Copilot AI review requested due to automatic review settings February 17, 2026 18:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

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 this pull request may close these issues.

[Device Support Request] Tuya gas detector TS0601 by _TZE204_uo8qcagc

1 participant

Comments