Sfoglia il codice sorgente

Update yym_805SW_aroma_nightlight.yaml

Added missing dpses
spuljko 3 anni fa
parent
commit
9ca011214d

+ 97 - 0
custom_components/tuya_local/devices/yym_805SW_aroma_nightlight.yaml

@@ -1,3 +1,4 @@
+# DPS sample: {'updated_at': 1674433099.9169242, '1': True, '2': 'large', '3': '1', '5': True, '6': 'colourful1', '8': '001fff00e8ffff'} 
 name:  YYM-805SW Aroma diffuser
 name:  YYM-805SW Aroma diffuser
 products:
 products:
     - id: c0nh3LmEk0NDebrq
     - id: c0nh3LmEk0NDebrq
@@ -7,18 +8,114 @@ primary_entity:
     - id: 1
     - id: 1
       name: switch
       name: switch
       type: boolean
       type: boolean
+      mapping:
+        - dps_val: true
+          icon: mdi:scent
+          value: ON
+        - dps_val: false
+          icon: mdi:scent-off
+          value: OFF      
     - id: 2
     - id: 2
       name: speed
       name: speed
       type: string
       type: string
+      hidden: true
       mapping:
       mapping:
         - dps_val: large
         - dps_val: large
           value: 100
           value: 100
+          icon: "mdi:sprinkler-variant"
         - dps_val: small
         - dps_val: small
           value: 50
           value: 50
+          icon: "mdi:sprinkler"
+    - id: 4          
+      name: "Left time"
+      readolny: true
+      optional: true
+      type: integer
+      range:
+        min: 0
+        max: 360
 secondary_entities:
 secondary_entities:
   - entity: light
   - entity: light
     name: Nightlight
     name: Nightlight
+    icon: "mdi:light-recessed"
     dps:
     dps:
       - id: 5
       - id: 5
         name: switch
         name: switch
         type: boolean
         type: boolean
+      - id: 6 
+        name: color_mode  #effect
+        type: string
+        hidden: true
+        mapping:
+          - dps_val: colour
+            value: rgbw 
+      - id: 8   # not working
+        name: rgbhsv  
+        type: hex     
+        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: 100
+          - name: v
+            bytes: 1
+            range:
+              min: 0
+              max: 100
+  - entity: select
+    name: "Color mode"
+    category: config
+    icon: "mdi:palette"
+    dps:
+    - id: 6
+      name: option
+      type: string
+      mapping:
+        - dps_val: colour
+          value: Color
+        - dps_val: colourful1
+          value: Colorful          
+  - entity: select
+    name: "Spray mode"
+    category: config
+    icon: "mdi:sprinkler-variant"
+    dps:
+    - id: 2
+      name: option
+      type: string
+      mapping:
+        - dps_val: large
+          value: Large
+          icon: "mdi:sprinkler-variant"
+        - dps_val: small
+          value: Small
+          icon: "mdi:sprinkler"
+  - entity: select
+    name: Timer
+    icon: "mdi:timer"
+    category: config
+    dps:
+      - id: 3
+        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"