Преглед изворни кода

feat(arida_eva_humidifier): add support for Arida Eva humidifier (#4489)

* feat(arida_eva_humidifier): add support for Arida Eva humidifier

* fix(arida_eva_humidifier): update product ID and remove diagnostic categories

* fix(arida_eva_humidifier): update entity types and mappings for faults

* fix(arida_eva_humidifier): remove category from tank_empty binary sensor

* fix (arida_eva_humidifier): follow standard pattern for problem sensor

- use default class naming to take advantage of HA translations.
- put fault code as an attribute rather than a separate sensor.

PR #4489

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Benjamin Lyon пре 2 недеља
родитељ
комит
e20fae4467
1 измењених фајлова са 189 додато и 0 уклоњено
  1. 189 0
      custom_components/tuya_local/devices/arida_eva_humidifier.yaml

+ 189 - 0
custom_components/tuya_local/devices/arida_eva_humidifier.yaml

@@ -0,0 +1,189 @@
+name: Humidifier
+products:
+  - id: gsn2b1cgyeivpjka
+    manufacturer: Arida
+    model: Eva
+entities:
+  - entity: humidifier
+    class: humidifier
+    dps:
+      - id: 1
+        name: switch
+        type: boolean
+      - id: 102
+        name: humidity
+        type: string
+        mapping:
+          - dps_val: cancel
+            value: 0
+          - dps_val: 30t
+            value: 30
+          - dps_val: 35t
+            value: 35
+          - dps_val: 40t
+            value: 40
+          - dps_val: 45t
+            value: 45
+          - dps_val: "50"
+            value: 50
+          - dps_val: 55t
+            value: 55
+          - dps_val: 60t
+            value: 60
+          - dps_val: 65t
+            value: 65
+          - dps_val: 70t
+            value: 70
+          - dps_val: 75t
+            value: 75
+          - dps_val: 80t
+            value: 80
+      - id: 14
+        name: current_humidity
+        type: integer
+      - id: 103
+        name: mode
+        type: boolean
+        mapping:
+          - dps_val: true
+            value: auto
+          - dps_val: false
+            value: normal
+  - entity: sensor
+    class: temperature
+    dps:
+      - id: 10
+        name: sensor
+        type: integer
+        unit: C
+  - entity: select
+    name: Mist level
+    icon: mdi:water-percent
+    category: config
+    dps:
+      - id: 23
+        name: option
+        type: string
+        mapping:
+          - dps_val: level_1
+            value: Low
+          - dps_val: level_2
+            value: Medium
+          - dps_val: level_3
+            value: High
+  - entity: select
+    translation_key: timer
+    category: config
+    dps:
+      - id: 19
+        name: option
+        type: string
+        mapping:
+          - dps_val: cancel
+            value: cancel
+          - dps_val: 1h
+            value: 1h
+          - dps_val: 2h
+            value: 2h
+          - dps_val: 3h
+            value: 3h
+          - dps_val: 4h
+            value: 4h
+          - dps_val: 5h
+            value: 5h
+          - dps_val: 6h
+            value: 6h
+          - dps_val: 7h
+            value: 7h
+          - dps_val: 8h
+            value: 8h
+          - dps_val: 9h
+            value: 9h
+          - dps_val: 10h
+            value: 10h
+          - dps_val: 11h
+            value: 11h
+          - dps_val: 12h
+            value: 12h
+  - entity: sensor
+    translation_key: time_remaining
+    class: duration
+    dps:
+      - id: 20
+        name: sensor
+        type: integer
+        unit: min
+  - entity: binary_sensor
+    translation_key: tank_empty
+    class: problem
+    dps:
+      - id: 22
+        name: sensor
+        type: bitfield
+        optional: true
+        mapping:
+          - dps_val: 2
+            value: true
+          - value: false
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 22
+        name: sensor
+        type: bitfield
+        optional: true
+        mapping:
+          - dps_val: 0
+            value: false
+          - dps_val: 2
+            value: false
+          - value: true
+      - id: 22
+        name: fault_code
+        type: bitfield
+        optional: true
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 29
+        name: lock
+        type: boolean
+  - entity: switch
+    name: Warm mist
+    icon: mdi:fire
+    category: config
+    dps:
+      - id: 101
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: uv_sterilization
+    category: config
+    dps:
+      - id: 104
+        name: switch
+        type: boolean
+  - entity: light
+    translation_key: display
+    category: config
+    dps:
+      - id: 105
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: sleep
+    category: config
+    dps:
+      - id: 106
+        name: switch
+        type: boolean
+  - entity: switch
+    name: Cleaning mode
+    icon: "mdi:spray-bottle"
+    category: config
+    dps:
+      - id: 107
+        type: boolean
+        name: switch