Просмотр исходного кода

feat(devices): add TS100 water quality controller

Issue #5860
Jason Rumney 1 день назад
Родитель
Сommit
d44a887904
2 измененных файлов с 262 добавлено и 0 удалено
  1. 1 0
      DEVICES.md
  2. 261 0
      custom_components/tuya_local/devices/ts100_waterqualitycontrol.yaml

+ 1 - 0
DEVICES.md

@@ -1436,6 +1436,7 @@ port and password.
 - Tontine electric blanket
 - TOPENS TC196 remote control for gate openers
 - Treatlife 24GHz mmWave human presence sensor
+- TS100 water quality controller
 - TX-E gas sensor/alarm
 - Vevor YT60307 weather station
 - Vivo FD55 motorized TV mount

+ 261 - 0
custom_components/tuya_local/devices/ts100_waterqualitycontrol.yaml

@@ -0,0 +1,261 @@
+name: Water quality controller
+products:
+  - id: momdb5fyxnl6x41g
+    model: TS100
+entities:
+  - entity: sensor
+    class: ph
+    dps:
+      - id: 101
+        type: integer
+        name: sensor
+        class: measurement
+        mapping:
+          - scale: 100
+      - id: 118
+        type: integer
+        name: firmware_version
+  - entity: sensor
+    name: ORP
+    class: voltage
+    dps:
+      - id: 102
+        type: integer
+        name: sensor
+        unit: mV
+        class: measurement
+  - entity: select
+    translation_key: temperature_unit
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        name: option
+        mapping:
+          - dps_val: false
+            value: celsius
+          - dps_val: true
+            value: fahrenheit
+  - entity: sensor
+    class: temperature
+    dps:
+      - id: 104
+        type: integer
+        name: sensor
+        class: measurement
+        mapping:
+          - scale: 10
+      - id: 103
+        type: boolean
+        name: unit
+        mapping:
+          - dps_val: true
+            value: F
+          - value: C
+  - entity: number
+    name: pH calibration
+    category: config
+    class: ph
+    hidden: true
+    dps:
+      - id: 105
+        type: integer
+        optional: true
+        name: value
+        range:
+          min: 0
+          max: 1200
+        mapping:
+          - scale: 100
+  - entity: number
+    name: ORP calibration
+    class: voltage
+    category: config
+    hidden: true
+    dps:
+      - id: 106
+        type: integer
+        optional: true
+        name: value
+        unit: mV
+        range:
+          min: 0
+          max: 1000
+  - entity: select
+    name: pH calibration type
+    icon: "mdi:ph"
+    category: config
+    dps:
+      - id: 107
+        type: string
+        name: option
+        mapping:
+          - dps_val: EP_USP
+            value: EP/USP Pharmaceutical
+          - dps_val: NIST
+            value: NIST
+  - entity: select
+    name: pH dosing mode
+    icon: "mdi:ph"
+    translation_key: mode
+    category: config
+    dps:
+      - id: 108
+        type: string
+        name: option
+        mapping:
+          - dps_val: Manual
+            value: manual
+          - dps_val: Automatic
+            value: auto
+  - entity: number
+    name: Dosing speed
+    category: config
+    dps:
+      - id: 109
+        type: integer
+        name: value
+        unit: "%"
+        range:
+          min: 50
+          max: 100
+  - entity: number
+    name: Dosing time
+    category: config
+    class: duration
+    dps:
+      - id: 110
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 1
+          max: 30
+  - entity: switch
+    name: Dosing pump
+    category: config
+    dps:
+      - id: 111
+        type: boolean
+        name: switch
+  - entity: number
+    class: ph
+    category: config
+    dps:
+      - id: 112
+        type: integer
+        name: value
+        range:
+          min: 720
+          max: 780
+        mapping:
+          - scale: 100
+            step: 10
+  - entity: binary_sensor
+    name: Water
+    class: running
+    category: diagnostic
+    dps:
+      - id: 113
+        type: boolean
+        name: sensor
+  - entity: button
+    name: Probe reset
+    category: config
+    dps:
+      - id: 114
+        type: boolean
+        optional: true
+        name: button
+  - entity: sensor
+    name: Probe usage
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 115
+        type: integer
+        name: sensor
+        unit: h
+        class: measurement
+  - entity: sensor
+    name: Probe replacement
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 116
+        type: integer
+        name: sensor
+        unit: h
+        class: measurement
+  - entity: binary_sensor
+    name: Probe warning
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 117
+        type: boolean
+        name: sensor
+  - entity: number
+    class: volume_storage
+    name: Pool volume
+    category: config
+    icon: "mdi:pool"
+    dps:
+      - id: 119
+        type: integer
+        name: value
+        range:
+          min: 1000
+          max: 1000000
+        mapping:
+          - scale: 1000
+            step: 1000
+      - id: 103
+        type: boolean
+        name: unit
+        mapping:
+          - dps_val: true
+            value: gal
+          - value: L
+  - entity: sensor
+    name: Calibration status
+    translation_key: status
+    class: enum
+    category: diagnostic
+    hidden: true
+    dps:
+      - id: 120
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: Free
+            value: idle
+          - dps_val: Busy
+            value: working
+          - dps_val: Success
+            value: done
+          - dps_val: Failed
+            value: failed
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 121
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 121
+        type: bitfield
+        name: fault_code
+  - entity: sensor
+    name: Auto pH adjustment cycles
+    category: diagnostic
+    dps:
+      - id: 122
+        type: integer
+        name: sensor
+        unit: times
+        class: total_increasing