Selaa lähdekoodia

Added support for ZX-GS21 gas leak alarm.

Issue #679
Jason Rumney 2 vuotta sitten
vanhempi
commit
04add2aec3

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -301,3 +301,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [epajfl00](https://github.com/epajfl00) for assisting with support for Neo Coolcam sirens.
 - [epajfl00](https://github.com/epajfl00) for assisting with support for Neo Coolcam sirens.
 - [jorometala](https://github.com/jorometala) for assisting with support for Iebeyond ECH RF hub doorbells.
 - [jorometala](https://github.com/jorometala) for assisting with support for Iebeyond ECH RF hub doorbells.
 - [Yersi88](https://github.com/Yersi88) for contributing support for Costway portable air conditioners.
 - [Yersi88](https://github.com/Yersi88) for contributing support for Costway portable air conditioners.
+- [bdkacz](https://github.com/bdkacz) for assisting with support for ZX-GS21 gask leak alarms.

+ 1 - 0
DEVICES.md

@@ -417,6 +417,7 @@ of device.
 - Universal remote control (supports sensors only)
 - Universal remote control (supports sensors only)
 - Yieryi water quality monitor (also matches unbranded PH-W3988 device)
 - Yieryi water quality monitor (also matches unbranded PH-W3988 device)
 - ZN-2C09 9-in-1 air quality monitor
 - ZN-2C09 9-in-1 air quality monitor
+- ZX-GS21 gas leak alarm monitor
 - ZY-M100-WiFi mmWave human presence sensor
 - ZY-M100-WiFi mmWave human presence sensor
 
 
 ### Devices supported via Bluetooth hubs
 ### Devices supported via Bluetooth hubs

+ 90 - 0
custom_components/tuya_local/devices/zx_gs21_gasmonitor.yaml

@@ -0,0 +1,90 @@
+name: Gas leak detector
+products:
+  - id: ozcdjaqrxauonq1f
+    name: ZX-GS21
+primary_entity:
+  entity: sensor
+  name: Gas leak
+  category: diagnostic
+  dps:
+    - id: 2
+      type: integer
+      name: sensor
+      unit:  "%LEL"
+      class: measurement
+    - id: 1
+      type: string
+      name: gas_state
+secondary_entities:
+  - entity: number
+    name: Alarm duration
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 7
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 60
+  - entity: button
+    name: Self check
+    category: config
+    dps:
+      - id: 8
+        type: boolean
+        name: button
+      - id: 9
+        type: string
+        name: result
+  - entity: binary_sensor
+    name: Preheat
+    class: heat
+    category: diagnostic
+    dps:
+      - id: 10
+        type: boolean
+        name: sensor
+  - entity: binary_sensor
+    name: Lifecycle
+    category: diagnostic
+    dps:
+      - id: 12
+        type: boolean
+        name: sensor
+  - entity: switch
+    name: Silent
+    category: config
+    dps:
+      - id: 16
+        type: boolean
+        name: switch
+  - entity: binary_sensor
+    name: Carbon monoxide alarm
+    class: 
+    category: diagnostic
+    dps:
+      - id: 18
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: alarm
+            value: true
+          - value: false
+  - entity: sensor
+    name: Carbon monoxide
+    class: carbon_monoxide
+    category: diagnostic
+    dps:
+      - id: 19
+        type: integer
+        name: sensor
+        unit: ppm
+        class: measurement
+      - id: 18
+        type: string
+        name: alarm_state
+
+
+