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

Add support for Etersky aroma diffuser.

Issue #511

Due to the brightness and color dps not showing up in the log, and no
iot portal information being available, the format for these is
uncertain, and based on other similar devices.
Jason Rumney 3 лет назад
Родитель
Сommit
01e1cb0a18
3 измененных файлов с 123 добавлено и 1 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 2 1
      DEVICES.md
  3. 120 0
      custom_components/tuya_local/devices/etersky_aroma_diffuser.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -213,3 +213,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [A-J-O](https://github.com/A-J-O) for assisting with support for Heat Storm 6000W heaters.
 - [demonkazuya](https://github.com/demonkazuya) for assisting with support for Smartrul smart wallplugs (dual_power_monitor_smartplugv2)
 - [runlar](https://github.com/runlar) for assisting with support for Deltaco SH-P02E smartplugs (dual_power_monitoring_smartplugv2 without some optional features)
+- [Kannix2005](https://github.com/Kannix2005) for assisting with support for Etersky aroma diffusers.

+ 2 - 1
DEVICES.md

@@ -164,7 +164,8 @@
 ### Aroma diffusers
 
 - Asakuki aroma diffuser with light
-- YYM-805SW aroma diffuser with nightlight
+- Etersky aroma diffuser with light
+- YYM-805SW aroma diffuser with light
 
 ### Kitchen Appliances
 

+ 120 - 0
custom_components/tuya_local/devices/etersky_aroma_diffuser.yaml

@@ -0,0 +1,120 @@
+name: Etersky aroma diffuser
+products:
+  - id: rvajlvjh4qoj1lkn
+primary_entity:
+  entity: fan
+  dps:
+    - id: 2
+      name: switch
+      type: boolean
+      mapping:
+        - dps_val: true
+          icon: mdi:scent
+          value: ON
+        - dps_val: false
+          icon: mdi:scent-off
+          value: OFF
+    - id: 3
+      name: speed
+      type: string
+      mapping:
+        - dps_val: large
+          value: 100
+        - dps_val: small
+          value: 50
+    - id: 11
+      name: fault_code
+      type: bitfield
+secondary_entities:
+  - entity: switch
+    name: Power
+    class: switch
+    category: config
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+  - entity: light
+    name: Nightlight
+    dps:
+      - id: 7
+        name: switch
+        type: boolean
+      - id: 8
+        name: brightness
+        type: integer
+        optional: true
+      - id: 9
+        name: color_mode
+        type: string
+        mapping:
+          - dps_val: white
+            value: white
+          - dps_val: colour
+            value: rgbw
+      - id: 10
+        name: rgbhsv
+        type: hex
+        optional: true
+        format:
+          - name: r
+            bytes: 1
+          - name: g
+            bytes: 1
+          - name: b
+            bytes: 1
+          - name: h
+            bytes: 2
+            range:
+              min: 0
+              max: 360
+          - name: s
+            bytes: 1
+            range:
+              min: 0
+              max: 255
+          - name: v
+            bytes: 1
+            range:
+              min: 0
+              max: 255
+  - entity: select
+    name: Timer
+    icon: "mdi:timer"
+    category: config
+    dps:
+      - id: 4
+        name: option
+        type: string
+        mapping:
+          - dps_val: "cancel"
+            value: "Off"
+          - dps_val: "1"
+            value: "1 hour"
+          - dps_val: "3"
+            value: "3 hours"
+          - dps_val: "6"
+            value: "6 hours"
+  - entity: sensor
+    name: Time remaining
+    class: duration
+    icon: "mdi:timer"
+    category: diagnostic
+    dps:
+      - id: 5
+        type: integer
+        name: sensor
+        unit: min
+  - entity: binary_sensor
+    name: Fault
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 11
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+