浏览代码

Create tx_e_gasmonitor.yaml (#4441)

* Create tx_e_gasmonitor.yaml

Added support for tx-e gas monitor.

Gas alarm will appear in the security section and gas level and temperature in the area.

* Update tx_e_gasmonitor.yaml

Fix lint issues, correctly add name and value for the temperature alarm

* Update tx_e_gasmonitor.yaml

Move the alarm upper limit to the config category so it's not automatically shown on a dashboard

* Update DEVICES.md

Added to the devices readme

* feat (tx_e_gasmonitor): use default names where possible

- default names allows translations to be used, so avoid overriding them unnecessarily
- add move temperature alarm state attribute to binary_sensor

PR #4441

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Stevehans 5 天之前
父节点
当前提交
4198bc83e0
共有 2 个文件被更改,包括 116 次插入0 次删除
  1. 1 0
      DEVICES.md
  2. 115 0
      custom_components/tuya_local/devices/tx_e_gasmonitor.yaml

+ 1 - 0
DEVICES.md

@@ -1222,6 +1222,7 @@ port and password.
 - Tontine electric blanket
 - Tontine electric blanket
 - TOPENS TC196 remote control for gate openers
 - TOPENS TC196 remote control for gate openers
 - Treatlife 24GHz mmWave human presence sensor
 - Treatlife 24GHz mmWave human presence sensor
+- TX-E Gas sensor/alarm
 - Valehaus SYZN119 towel warmer
 - Valehaus SYZN119 towel warmer
 - Vivo FD55 motorized TV mount
 - Vivo FD55 motorized TV mount
 - VT-14N1 9-in-1 air quality monitor
 - VT-14N1 9-in-1 air quality monitor

+ 115 - 0
custom_components/tuya_local/devices/tx_e_gasmonitor.yaml

@@ -0,0 +1,115 @@
+name: Gas leak detector
+products:
+  - id: 6jq20w6wnn4faw29
+    model: TX-E
+entities:
+  - entity: binary_sensor
+    class: gas
+    icon: "mdi:gas-cylinder"
+    dps:
+      - id: 1
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: "normal"
+            value: false
+          - value: true
+  - entity: sensor
+    name: Gas
+    icon: "mdi:gas-cylinder"
+    dps:
+      - id: 2
+        type: integer
+        name: sensor
+        unit: "% LEL"
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: number
+    name: Alarm duration
+    category: config
+    class: duration
+    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
+    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
+  - 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: sensor
+    class: temperature
+    dps:
+      - id: 19
+        type: integer
+        name: sensor
+        unit: C
+        class: measurement
+  - entity: binary_sensor
+    class: heat
+    dps:
+      - id: 18
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: alarm
+            value: true
+          - value: false
+  - entity: number
+    name: Temperature alarm threshold
+    category: config
+    dps:
+      - id: 101
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 100
+        unit: C