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

feat(devices): add Nobito air quality monitor

Issue #4889
Jason Rumney 1 неделя назад
Родитель
Сommit
534ba56fdb
2 измененных файлов с 239 добавлено и 0 удалено
  1. 1 0
      DEVICES.md
  2. 238 0
      custom_components/tuya_local/devices/nobito_airqualitymonitor.yaml

+ 1 - 0
DEVICES.md

@@ -1278,6 +1278,7 @@ port and password.
 - Mustool MT15/MT29 air quality box
 - Nedis WIFIPD10WT pill dispenser
 - Nedis WIFISA10CWT air quality monitor
+- Nobito air quality monitor
 - Palicy EC Pro 4 pool chlorinator
 - PGST PA-010 indoor temperature and humidity sensor
 - PH-W218 water quality monitor

+ 238 - 0
custom_components/tuya_local/devices/nobito_airqualitymonitor.yaml

@@ -0,0 +1,238 @@
+name: Air quality monitor
+products:
+  - id: ofq1jlyksn2rys3o
+    manufacturer: Nobito
+entities:
+  - entity: sensor
+    translation_key: air_quality
+    class: enum
+    dps:
+      - id: 1
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: level_1
+            value: excellent
+          - dps_val: level_2
+            value: good
+          - dps_val: level_3
+            value: poor
+          - dps_val: level_4
+            value: severe
+  - entity: sensor
+    class: temperature
+    dps:
+      - id: 2
+        type: integer
+        optional: true
+        name: sensor
+        class: measurement
+        unit: C
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: humidity
+    dps:
+      - id: 3
+        type: integer
+        optional: true
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: sensor
+    class: carbon_dioxide
+    dps:
+      - id: 4
+        type: integer
+        optional: true
+        name: sensor
+        unit: ppm
+        class: measurement
+  - entity: sensor
+    name: HCHO
+    class: volatile_organic_compounds
+    dps:
+      - id: 5
+        type: integer
+        optional: true
+        name: sensor
+        unit: ugm3
+        class: measurement
+  - entity: sensor
+    class: volatile_organic_compounds
+    dps:
+      - id: 6
+        type: integer
+        optional: true
+        name: sensor
+        unit: ugm3
+        class: measurement
+  - entity: sensor
+    class: pm25
+    dps:
+      - id: 7
+        type: integer
+        optional: true
+        name: sensor
+        unit: ugm3
+        class: measurement
+  - entity: sensor
+    class: pm1
+    dps:
+      - id: 8
+        type: integer
+        optional: true
+        name: sensor
+        unit: ugm3
+        class: measurement
+  - entity: sensor
+    class: pm10
+    dps:
+      - id: 9
+        type: integer
+        optional: true
+        name: sensor
+        unit: ugm3
+        class: measurement
+  - entity: sensor
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 22
+        type: integer
+        optional: true
+        name: sensor
+        unit: "%"
+        class: measurement
+      - id: 21
+        type: string
+        optional: true
+        name: status
+  - entity: binary_sensor
+    class: battery_charging
+    category: diagnostic
+    dps:
+      - id: 23
+        type: boolean
+        optional: true
+        name: sensor
+  - entity: sensor
+    class: carbon_monoxide
+    dps:
+      - id: 101
+        type: integer
+        optional: true
+        name: sensor
+        unit: ppm
+        class: measurement
+  - entity: select
+    translation_key: temperature_unit
+    category: config
+    dps:
+      - id: 102
+        type: string
+        name: option
+        mapping:
+          - dps_val: c
+            value: celsius
+          - dps_val: f
+            value: fahrenheit
+  - entity: switch
+    translation_key: sound
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Alarm 1
+    category: config
+    dps:
+      - id: 104
+        type: boolean
+        optional: true
+        name: switch
+  - entity: switch
+    name: Alarm 2
+    category: config
+    dps:
+      - id: 105
+        type: boolean
+        optional: true
+        name: switch
+  - entity: number
+    name: Alarm temperature
+    category: config
+    class: temperature
+    dps:
+      - id: 106
+        type: integer
+        optional: true
+        name: value
+        range:
+          min: 0
+          max: 60
+        mapping:
+          - constraint: unit
+            conditions:
+              - dps_val: f
+                value_redirect: value_f
+                scale: 10
+                range:
+                  min: -158
+                  max: 1760
+      - id: 109
+        type: integer
+        optional: true
+        name: value_f
+        range:
+          min: -158
+          max: 1760
+        mapping:
+          - scale: 10
+      - id: 102
+        type: string
+        name: unit
+        mapping:
+          - dps_val: f
+            value: F
+          - value: C
+  - entity: time
+    translation_key: timer_x
+    translation_placeholders:
+      x: "1"
+    category: config
+    dps:
+      - id: 108
+        type: integer
+        optional: true
+        name: second
+        range:
+          min: 0
+          max: 86399
+  - entity: time
+    translation_key: timer_x
+    translation_placeholders:
+      x: "2"
+    category: config
+    dps:
+      - id: 107
+        type: integer
+        optional: true
+        name: minute
+        range:
+          min: 0
+          max: 1439
+  - entity: time
+    translation_key: timer_x
+    translation_placeholders:
+      x: "3"
+    category: config
+    dps:
+      - id: 111
+        type: integer
+        optional: true
+        name: minute
+        range:
+          min: 0
+          max: 1439