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

feat(devices): add support for Revesien Q-Pro-W aroma diffuser

Issue #3540
Jason Rumney пре 6 месеци
родитељ
комит
c6a7325f50
3 измењених фајлова са 158 додато и 0 уклоњено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 156 0
      custom_components/tuya_local/devices/revesien_qprow_diffuser.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1023,3 +1023,4 @@ Further device support has been made with the assistance of users. Please consid
 - [pbassut](https://github.com/pbassut) for contributing improvements to AGL Ultra Magic lock.
 - [Zxwcount](https://github.com/Zxwcount) for assisting with support for Haozee RB-SRAIN01 rain sensor.
 - [tobias-b-gmx](https://github.com/tobias-b-gmx) for assisting with support for Dewin KWS-306WF energy monitoring circuit breaker, Sichler ZX-7655 heater.
+- [chrkov](https://github.com/chrkov) for assisting with support for Revesien Q-Pro-W aroma diffuser.

+ 1 - 0
DEVICES.md

@@ -432,6 +432,7 @@
 - Etersky aroma diffuser with light
 - InLine ultrasonic aroma diffuser
 - Maxico aroma diffuser with light (cannot be differentiated automatically from Ditua above)
+- Revesien Q-Pro-W aroma diffuser
 - Tesla Smart aroma diffuser with light
 - YX-025 WB aroma diffuser
 - YX316WIFI aroma diffuser

+ 156 - 0
custom_components/tuya_local/devices/revesien_qprow_diffuser.yaml

@@ -0,0 +1,156 @@
+name: Aroma diffuser
+products:
+  - id: istgdkmlsv3nwnbn
+    manufacturer: Revesien
+    model: Q-Pro-W
+entities:
+  - entity: fan
+    translation_key: aroma_diffuser
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+      - id: 103
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: EconoMode
+            value: low
+          - dps_val: ComfortMode
+            value: medium
+          - dps_val: MaximumPerformance
+            value: high
+          - dps_val: fanMode
+            value: fan
+  - entity: fan
+    name: Continuous output
+    dps:
+      - id: 111
+        type: string
+        name: switch
+        mapping:
+          - dps_val: "0"
+            value: true
+          - dps_val: "1"
+            value: false
+      - id: 107
+        type: integer
+        optional: true
+        name: speed
+        range:
+          min: 5
+          max: 300
+        mapping:
+          - step: 5
+      - id: 1
+        type: boolean
+        name: available
+  - entity: switch
+    name: Fan
+    icon: "mdi:fan"
+    dps:
+      - id: 109
+        type: boolean
+        name: switch
+  - entity: number
+    name: "On cycle"
+    class: duration
+    category: config
+    dps:
+      - id: 104
+        type: integer
+        optional: true
+        name: value
+        unit: s
+        range:
+          min: 5
+          max: 300
+        mapping:
+          - step: 5
+      - id: 111
+        type: string
+        name: available
+        mapping:
+          - dps_val: "0"
+            value: false
+          - value_redirect: powered
+      - id: 1
+        type: boolean
+        name: powered
+        hidden: true
+  - entity: number
+    name: "Off cycle"
+    class: duration
+    category: config
+    dps:
+      - id: 105
+        type: integer
+        optional: true
+        name: value
+        unit: s
+        range:
+          min: 5
+          max: 300
+        mapping:
+          - step: 5
+      - id: 111
+        type: string
+        name: available
+        mapping:
+          - dps_val: "0"
+            value: false
+          - value_redirect: powered
+      - id: 1
+        type: boolean
+        name: powered
+        hidden: true
+  - entity: text
+    name: Schedule
+    category: config
+    hidden: true
+    dps:
+      - id: 106
+        type: base64
+        optional: true
+        name: value
+  - entity: sensor
+    name: Device life
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 108
+        type: base64
+        optional: true
+        mask: "FFFFFFFF00000000"
+        name: sensor
+        unit: s
+        class: measurement
+  - entity: sensor
+    name: Working time
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 108
+        type: base64
+        optional: true
+        mask: "00000000FFFFFFFF"
+        name: sensor
+        unit: s
+        class: measurement
+  - entity: select
+    name: Reset capacity
+    icon: "mdi:reload"
+    category: config
+    dps:
+      - id: 110
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: "25%"
+          - dps_val: "1"
+            value: "50%"
+          - dps_val: "2"
+            value: "75%"
+          - dps_val: "3"
+            value: "100%"