소스 검색

feat (devices): add Haozee gas leak and carbon monoxide alarm

Issue #3903
Jason Rumney 4 달 전
부모
커밋
7a7f4963c9
3개의 변경된 파일186개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 184 0
      custom_components/tuya_local/devices/haozee_cogasleak_detector.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1101,3 +1101,4 @@ Further device support has been made with the assistance of users. Please consid
 - [MiguelDomingues](https://github.com/MiguelDomingues) for contributing support for EARU K6RH-3A thermostat.
 - [barneybastelt](https://github.com/barneybastelt) for contributing support for BlitzHome BH-CDW1 dishwasher.
 - [bobek212141-wq](https://github.com/bobek212141-wq) for assisting with support for Moes TRV601 thermostat radiator valve.
+- [1stDeadeye](https://github.com/1stDeadeye) for assisting with support for Haozee gas leak and carbon monoxide alarm.

+ 1 - 0
DEVICES.md

@@ -1061,6 +1061,7 @@ port and password.
 - GZAIR radon gas detector
 - Haier Nayun NY-GS-04 combustible gas alarm
 - Haoliyuen EWC02 air quality monitor
+- Haozee explosive gas leak and carbon monoxide alarm
 - Haozee PS10 mmWave presence sensing light switch
 - Houschen anti-fog bathroom mirror with lights
 - HRT AS90 temperature and humidity alarm

+ 184 - 0
custom_components/tuya_local/devices/haozee_cogasleak_detector.yaml

@@ -0,0 +1,184 @@
+name: Gas and CO detector
+products:
+  - id: piuvzdlag3zsiqjk
+    manufacturer: Haozee
+entities:
+  - entity: switch
+    name: Self check
+    icon: "mdi:check-circle"
+    category: config
+    dps:
+      - id: 18
+        type: boolean
+        name: switch
+  - entity: sensor
+    name: Self check result
+    class: enum
+    category: diagnostic
+    dps:
+      - id: 19
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: checking
+            value: Checking
+          - dps_val: check_success
+            value: Success
+          - dps_val: check_failure
+            value: Failure
+          - dps_val: others
+            value: Uncertain
+  - entity: binary_sensor
+    name: Preheating
+    class: cold
+    category: diagnostic
+    dps:
+      - id: 20
+        type: boolean
+        name: sensor
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 21
+        type: bitfield
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - dps_val: null
+            value: false
+          - value: true
+      - id: 21
+        type: bitfield
+        optional: true
+        name: fault_code
+  - entity: button
+    name: Mute alarm
+    dps:
+      - id: 24
+        type: boolean
+        optional: true
+        name: button
+  - entity: binary_sensor
+    class: gas
+    dps:
+      - id: 25
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: alarm
+            value: true
+          - value: false
+  - entity: sensor
+    name: Gas
+    icon: "mdi:gas-burner"
+    dps:
+      - id: 26
+        type: integer
+        name: sensor
+        unit: ppm
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: sensor
+    name: Alarm state
+    class: enum
+    category: diagnostic
+    dps:
+      - id: 29
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: alarm_sound
+            value: Sound
+          - dps_val: alarm_light
+            value: Light
+          - dps_val: alarm_sound_light
+            value: Sound + Light
+          - dps_val: normal
+            value: Not active
+  - entity: binary_sensor
+    name: Carbon monoxide
+    class: gas
+    dps:
+      - id: 34
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: alarm
+            value: true
+          - value: false
+  - entity: sensor
+    class: carbon_monoxide
+    category: diagnostic
+    dps:
+      - id: 35
+        type: integer
+        name: sensor
+        unit: ppm
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: number
+    name: Early warning target
+    category: config
+    class: duration
+    icon: "mdi:clock-alert"
+    dps:
+      - id: 101
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 1
+          max: 30
+  - entity: number
+    name: Early warnings
+    category: config
+    icon: "mdi:clock-alert"
+    dps:
+      - id: 102
+        type: integer
+        name: value
+        unit: times
+        range:
+          min: 1
+          max: 5
+  - entity: event
+    name: Carbon monoxide pre-warning
+    dps:
+      - id: 103
+        type: boolean
+        name: event
+        optional: true
+        mapping:
+          - dps_val: true
+            value: warning
+          - dps_val: false
+            value: clear
+  - entity: event
+    name: Test
+    dps:
+      - id: 103
+        type: boolean
+        name: event
+        optional: true
+        mapping:
+          - dps_val: true
+            value: testing
+          - dps_val: false
+            value: test_done
+  - entity: event
+    name: Gas leak pre-warning
+    dps:
+      - id: 105
+        type: boolean
+        name: event
+        optional: true
+        mapping:
+          - dps_val: true
+            value: warning
+          - dps_val: false
+            value: clear