Ver Fonte

Add support for Haier Nayun combustible gas alarm

Issue #1396
Jason Rumney há 2 anos atrás
pai
commit
7e9d2c6b9f

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -432,7 +432,7 @@ Further device support has been made with the assistance of users. Please consid
 - [magomao](https://github.com/magomao) for assisting with support for Vivion air conditioners.
 - [magomao](https://github.com/magomao) for assisting with support for Vivion air conditioners.
 - [palkoarpad85](https://github.com/palkoarpad85) for assisting with support for Klarstein Wonderwall heaters.
 - [palkoarpad85](https://github.com/palkoarpad85) for assisting with support for Klarstein Wonderwall heaters.
 - [MJW911](https://github.com/MJW911) for assisting with support for SX1 smartplugs.
 - [MJW911](https://github.com/MJW911) for assisting with support for SX1 smartplugs.
-- [ops244](https://github.com/ops244) for assisting with support for Hiper T3 bladeless fans, TTEC Robi Pro vacuums, M515 curtain motors.
+- [ops244](https://github.com/ops244) for assisting with support for Hiper T3 bladeless fans, TTEC Robi Pro vacuums, M515 curtain motors, Haier Nayun gas alarms.
 - [sevimuelli](https://github.com/sevimuelli) for contributing support for Eeese Anna dehumidifiers.
 - [sevimuelli](https://github.com/sevimuelli) for contributing support for Eeese Anna dehumidifiers.
 - [tataihono](https://github.com/tataihono) for contributing support for Arlec portable air conditioners.
 - [tataihono](https://github.com/tataihono) for contributing support for Arlec portable air conditioners.
 - [longer83](https://github.com/longer83) for assisting with support for Cleverio AD100 dehumidifiers.
 - [longer83](https://github.com/longer83) for assisting with support for Cleverio AD100 dehumidifiers.

+ 1 - 0
DEVICES.md

@@ -570,6 +570,7 @@ port and password.
 - Emax EM3378 Weather Station (selling as Hiper P1 and other rebrands)
 - Emax EM3378 Weather Station (selling as Hiper P1 and other rebrands)
 - Garza Wi-Fi garden irrigation system (ITV103W with 433MHz WiFi hub)
 - Garza Wi-Fi garden irrigation system (ITV103W with 433MHz WiFi hub)
 - GratKit filament dryer
 - GratKit filament dryer
+- Haier Nayun NY-GS-04 combustible gas alarm
 - Holman WX1 tap timer (sprinkler controller)
 - Holman WX1 tap timer (sprinkler controller)
 - Holman WX2 dual tap timer
 - Holman WX2 dual tap timer
 - Inkbird PTH-9CW air quality monitor
 - Inkbird PTH-9CW air quality monitor

+ 122 - 0
custom_components/tuya_local/devices/haier_nayun_gasalarm.yaml

@@ -0,0 +1,122 @@
+name: Gas alarm
+products:
+  - id: we7hw8nxeqvbd6g8
+    name: Haier Nayun NY-GS-04
+primary_entity:
+  entity: binary_sensor
+  class: gas
+  dps:
+    - id: 1
+      type: string
+      name: sensor
+      mapping:
+        - dps_val: normal
+          value: false
+        - dps_val: alarm
+          value: true
+secondary_entities:
+  - entity: sensor
+    name: Gas level
+    dps:
+      - id: 2
+        type: integer
+        name: sensor
+        unit: "% LEL" 
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: select
+    name: Alarm tone
+    icon: "mdi:siren"
+    category: config
+    dps:
+      - id: 6
+        type: string
+        name: option
+        mapping:
+          - dps_val: "1"
+            value: Alarm 1
+          - dps_val: "2"
+            value: Alarm 2
+          - dps_val: "3"
+            value: Alarm 3
+          - dps_val: "4"
+            value: Alarm 4
+          - dps_val: "5"
+            value: Alarm 5
+  - entity: number
+    name: Alarm duration
+    category: config
+    icon: "mdi:camera-timer"
+    dps:
+      - id: 7
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 1
+          max: 180
+  - entity: button
+    name: Self check
+    icon: "mdi:alert-circle-check"
+    category: config
+    dps:
+      - id: 8
+        type: boolean
+        name: button
+  - entity: sensor
+    name: Self-check result
+    class: enum
+    category: diagnostic
+    dps:
+      - id: 9
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: checking
+            value: In progress
+          - dps_val: check_success
+            value: OK
+          - dps_val: check_failure
+            value: Fail!
+          - value: Unknown
+      - id: 101
+        type: string
+        name: test_data
+        optional: true
+      - id: 102
+        type: integer
+        optional: true
+        name: test_2
+      - id: 103
+        type: integer
+        optional: true
+        name: test_3
+      - id: 104
+        type: integer
+        optional: true
+        name: test_4
+  - entity: binary_sensor
+    name: Warm up
+    class: cold
+    category: diagnostic
+    dps:
+      - id: 10
+        type: boolean
+        name: sensor
+  - entity: switch
+    name: Alarm enable
+    icon: "mdi:siren"
+    category: config
+    dps:
+      - id: 13
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Mute
+    icon: "mdi:volume-mute"
+    category: config
+    dps:
+      - id: 16
+        type: boolean
+        name: switch