Procházet zdrojové kódy

Add CO2V1_WiFi_Smart_CO2_detector (#3951)

* Add CO2V1_WiFi_Smart_CO2_detector

Almost the same as inkbird_pth9cw_airquality, but had to add proper scaling.
Device: WiFi Smart CO2 detector
CO2V1
Cheap Aliexpress chinese sensor.
Description: Tuya Wi_Fi Smart Co2 Meter Box Accurate Real Time Indoor Smoke Alarm Detector

* feat (co2v1_co2_sensor): rename from detector to sensor

- avoid redundant words in naming.
- since this gives readings rather than an alarm or binary sensor, it is more a sensor or monitor than detector
- use only lower case in filenames to avoid case sensitive vs insensitive filesystem issues.

PR #3951

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
sajtdavid před 4 měsíci
rodič
revize
3a2be73531

+ 30 - 0
custom_components/tuya_local/devices/co2v1_co2_sensor.yaml

@@ -0,0 +1,30 @@
+name: CO2 sensor
+entities:
+  - entity: sensor
+    class: carbon_dioxide
+    dps:
+      - id: 2
+        type: integer
+        name: sensor
+        unit: ppm
+        class: measurement
+  - entity: sensor
+    class: temperature
+    dps:
+      - id: 18
+        type: integer
+        name: sensor
+        unit: C
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: humidity
+    dps:
+      - id: 19
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+        mapping:
+          - scale: 10