소스 검색

Add support for Weaja gas alarm

Issue #2434
Jason Rumney 1 년 전
부모
커밋
fd24d8e5af
3개의 변경된 파일83개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 81 0
      custom_components/tuya_local/devices/weaja_s9_gasalarm.yaml

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -730,4 +730,4 @@ Further device support has been made with the assistance of users. Please consid
 - [Thommav](https://github.com/Thommav) for assisting with support for ZPmeter 214C water meter.
 - [Esp32-zapper](https://github.com/Esp32-zapper) for assisting with support for HunterTBK video doorbell.
 - [masfernandez](https://github.com/masfernandez) for assisting with support for Create Warm Towel Advance bathroom heater.
-- [Smandurlo](https://github.com/Smandurlo) for assisting with support for Klarstein Amazonia dishwasher.
+- [Smandurlo](https://github.com/Smandurlo) for assisting with support for Klarstein Amazonia dishwasher and Weaja gas alarm.

+ 1 - 0
DEVICES.md

@@ -853,6 +853,7 @@ port and password.
 - Tontine electric blanket
 - TOPENS TC196 remote control for gate openers
 - Valehaus SYZN119 towel warmer
+- Weaja WJ-TUYA-S9 gas alarm
 - WeatherStation Pro
 - Xiumii human presence radar
 - Yieryi water quality monitor (also matches unbranded PH-W3988 device)

+ 81 - 0
custom_components/tuya_local/devices/weaja_s9_gasalarm.yaml

@@ -0,0 +1,81 @@
+name: Gas alarm
+products:
+  - id: UNKNOWN
+    name: Weaja WJ-TUYA-S9
+primary_entity:
+  entity: binary_sensor
+  class: gas
+  dps:
+    - id: 2
+      type: string
+      name: sensor
+      mapping:
+        - dps_val: alarm
+          value: true
+        - value: false
+secondary_entities:
+  - entity: number
+    name: Alarm time
+    category: config
+    class: timer
+    dps:
+      - id: 3
+        type: integer
+        optional: true
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 60
+        mapping:
+          - dps_val: null
+            value: 0
+            hidden: true
+  - entity: sensor
+    name: Gas
+    icon: "mdi:fire"
+    dps:
+      - id: 5
+        type: integer
+        name: sensor
+        # image on website shows %LEL, but tuya docs say ppm
+        unit: "%LEL"
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: binary_sensor
+    name: Carbon monoxide
+    class: gas
+    dps:
+      - id: 6
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: alarm
+            value: true
+          - value: false
+  - entity: switch
+    name: Alarm
+    icon: "mdi:bullhorn"
+    category: config
+    dps:
+      - id: 12
+        type: boolean
+        name: switch
+  - entity: button
+    name: Mute
+    category: config
+    dps:
+      - id: 14
+        type: boolean
+        name: button
+        optional: true
+  - entity: sensor
+    class: carbon_monoxide
+    category: diagnostic
+    dps:
+      - id: 20
+        type: integer
+        name: sensor
+        unit: ppm
+        class: measurement