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

Add support for generic gas CO meter #1558

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions custom_components/tuya_local/devices/tuya_gas_sensor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: TUYA Gas Leak Detector
Copy link
Owner

Choose a reason for hiding this comment

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

Top level name should be generic, like "Gas leak detector"

products:
- name: TUYA Gas Leak Detector
Copy link
Owner

Choose a reason for hiding this comment

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

Products list must have id for each product, otherwise it will not be able to detect which is which.
Branding in name should be actual brand and model, I think Tuya is not selling any end products themselves.

Copy link
Owner

Choose a reason for hiding this comment

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

Product ids can be obtained by scanning your network with tinytuya if you do not have access to the iot.tuya.com portal to get the info from the cloud.

primary_entity:
entity: sensor
class: carbon_dioxide
Copy link
Owner

Choose a reason for hiding this comment

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

Title says CO. Is it carbon_monoxide, or carbon_dioxide?

Copy link
Owner

Choose a reason for hiding this comment

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

Need confirmation on this to proceed to merge.

name: Sensor Reading
Copy link
Owner

Choose a reason for hiding this comment

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

Remove the name, so that translations for carbon dioxide sensor are used.

dps:
- id: 5
type: float
Copy link
Owner

Choose a reason for hiding this comment

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

Is it really float? Most Tuya devices are using integer, and then apply a scale factor to get fixed point.

Copy link
Owner

Choose a reason for hiding this comment

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

Need confirmation on this to proceed to merge

name: sensor
class: measurement

Check failure on line 12 in custom_components/tuya_local/devices/tuya_gas_sensor.yaml

View workflow job for this annotation

GitHub Actions / lint

12:25 [new-line-at-end-of-file] no new line character at the end of file
Loading