Forráskód Böngészése

Add support for Xtreme TC20 carbon monoxide detector.

Issue #2956
Jason Rumney 10 hónapja
szülő
commit
c7885eeb3d

+ 2 - 0
ACKNOWLEDGEMENTS.md

@@ -875,3 +875,5 @@ Further device support has been made with the assistance of users. Please consid
 - [MichalSieciechowicz](https://github.com/MichalSieciechowicz) for contributing support for Manta Windy weather station.
 - [tomcastleman](https://github.com/tomcastleman) for contributing support for Aquagem Inverpro pool pump, which was merged with Madimack Inverflow.
 - [vanhoofseppe](https://github.com/vanhoofseppe) for contributing support for Vonroc heater.
+- [lechuorzech](https://github.com/lechuorzech) for assisting with support for Xtreme TC20 carbon monoxide detector.
+

+ 1 - 0
DEVICES.md

@@ -1004,6 +1004,7 @@ port and password.
 - Wenzhi WZ-100M-W human presence sensor
 - Wenzhi WZ35 human presence sensor
 - Xiumii human presence radar
+- Xtreme TC20 carbon monoxide detector
 - Yieryi water quality monitor (also matches unbranded PH-W3988 device)
 - Yinmik WF-3188 water quality monitor
 - Zecamin ZG-205W mmWave human presence sensor

+ 55 - 0
custom_components/tuya_local/devices/xtreme_tc20_codetector.yaml

@@ -0,0 +1,55 @@
+name: Carbon monoxide detector
+products:
+  - id: s3xbz2blagibrod5
+    manufacturer: Xtreme
+    model: TC20
+entities:
+  - entity: binary_sensor
+    class: gas
+    dps:
+      - id: 1
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: alarm
+            value: true
+          - dps_val: normal
+            value: false
+  - entity: button
+    name: Self check
+    category: config
+    dps:
+      - id: 8
+        type: boolean
+        name: button
+  - entity: sensor
+    name: Self check
+    class: enum
+    category: diagnostic
+    dps:
+      - id: 9
+        type: string
+        name: sensor 
+        mapping:
+          - dps_val: checking
+            value: checking
+          - dps_val: check_success
+            value: ok
+          - dps_val: check_failure
+            value: failed
+          - dps_val: others
+            value: unknown
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 11
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 11
+        type: bitfield
+        name: fault_code