Sfoglia il codice sorgente

Add support for Goldair GPDH340 dehumidifier

Issue #727
Jason Rumney 2 anni fa
parent
commit
5694098755

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -2,7 +2,7 @@
 
 None of this would have been possible without some foundational discovery work to get me started:
 
-- [nicole-ashley](https://github.com/nicole-ashley)'s [homeassistant-goldair-climate](https://github.com/nicole-ashley/homeassistant-goldair-climate) was the starting point for expanding to non-Goldair devices as well.
+- [nicole-ashley](https://github.com/nicole-ashley)'s [homeassistant-goldair-climate](https://github.com/nicole-ashley/homeassistant-goldair-climate) was the starting point for this project to expand to non-Goldair devices as well.  Initial support for GPPH heaters, GPDH420 dehumidifiers and GCPF315 fans is based on the upstream Goldair integration. Nicole also contributed GPDH340 dehumidifier support.
 - [TarxBoy](https://github.com/TarxBoy)'s [investigation using codetheweb/tuyapi](https://github.com/codetheweb/tuyapi/issues/31) to figure out the correlation of the cryptic DPS states .
 - [sean6541](https://github.com/sean6541)'s [tuya-homeassistant](https://github.com/sean6541/tuya-homeassistant) library giving an example of integrating Tuya devices with Home Assistant.
 - [clach04](https://github.com/clach04)'s [python-tuya](https://github.com/clach04/python-tuya) library.

+ 1 - 0
DEVICES.md

@@ -156,6 +156,7 @@
 - Eeese Adam dehumidifier
 - Eeese Carl dehumidifier
 - Eeese Otto dehumidifier
+- Goldair GPDH340 dehumidifier
 - Goldair GPDH420 dehumidifier
 - Honeywell TP(30/50/70) dehumidifiers
 - Hyundai Sahara dehumidifier

+ 3 - 0
custom_components/tuya_local/devices/goldair_dehumidifier.yaml

@@ -1,5 +1,8 @@
 name: Goldair dehumidifier
 legacy_type: dehumidifier
+products:
+  - id: gynthidZEhTUCoMN
+    name: GPDH420
 primary_entity:
   entity: humidifier
   class: dehumidifier

+ 155 - 0
custom_components/tuya_local/devices/goldair_gpdh340_dehumidifier.yaml

@@ -0,0 +1,155 @@
+name: Goldair dehumidifier
+products:
+  - id: okwjubkm9ndbq3j
+    name: GPDH340
+primary_entity:
+  entity: humidifier
+  class: dehumidifier
+  dps:
+    - id: 1
+      name: switch
+      type: boolean
+      mapping:
+        - dps_val: false
+          icon: "mdi:air-humidifier-off"
+          icon_priority: 3
+        - dps_val: true
+          icon: "mdi:air-humidifier"
+          icon_priority: 4
+    - id: 2
+      name: mode
+      type: string
+      mapping:
+        - dps_val: "4"
+          value: Sleeping space
+        - dps_val: "5"
+          value: Living space
+        - dps_val: "6"
+          value: Basement
+        - dps_val: "7"
+          value: Continuous
+    - id: 4
+      type: integer
+      name: humidity
+      range:
+        min: 35
+        max: 80
+      mapping:
+        - step: 5
+    - id: 11
+      type: bitfield
+      name: error
+      mapping:
+        - dps_val: 16
+          value: Tank full or missing
+          icon: "mdi:cup-water"
+          icon_priority: 1
+        - dps_val: 0
+          value: OK
+    - id: 105
+      type: integer
+      name: model_code
+    - id: 108
+      type: boolean
+      name: filter_clean_required
+      mapping:
+        - dps_val: true
+          icon: "mdi:air-filter"
+          icon_priority: 2
+      hidden: true
+    - id: 109
+      # manual says not available for GPDH340, so not split into switch
+      type: boolean
+      name: pump
+secondary_entities:
+  - entity: fan
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+      - id: 6
+        type: string
+        name: speed
+        mapping:
+          - dps_val: "1"
+            value: 33
+          - dps_val: "2"
+            value: 67
+          - dps_val: "3"
+            value: 100
+  - entity: light
+    name: Front display
+    category: config
+    dps:
+      - id: 107
+        type: boolean
+        name: switch
+        mapping:
+          - dps_val: true
+            icon: "mdi:numeric"
+          - dps_val: false
+            icon: "mdi:numeric-off"
+  - entity: lock
+    name: Child lock
+    icon: "mdi:hand-back-right-off"
+    category: config
+    dps:
+      - id: 106
+        type: boolean
+        name: lock
+  - entity: sensor
+    name: Current temperature
+    class: temperature
+    dps:
+      - id: 103
+        type: integer
+        name: sensor
+        unit: C
+        class: measurement
+  - entity: sensor
+    name: Current humidity
+    class: humidity
+    dps:
+      - id: 104
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: binary_sensor
+    name: Tank
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 11
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 16
+            value: true
+          - value: false
+  - entity: binary_sensor
+    name: Fault
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 11
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - dps_val: 16
+            value: false
+          - value: true
+  - entity: binary_sensor
+    name: Filter clean required
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 108
+        type: boolean
+        name: sensor
+
+
+
+