Ver código fonte

feat(cct_lightbulb): add optional DND switch

Issue #5305

Also break out the scene into a separate entity.
Jason Rumney 3 semanas atrás
pai
commit
0ef99a8ba9

+ 26 - 4
custom_components/tuya_local/devices/cct_lightbulb.yaml

@@ -40,10 +40,6 @@ entities:
           - target_range:
           - target_range:
               min: 2700
               min: 2700
               max: 6500
               max: 6500
-      - id: 25
-        name: scene
-        type: hex
-        optional: true
   - entity: time
   - entity: time
     translation_key: timer
     translation_key: timer
     category: config
     category: config
@@ -55,3 +51,29 @@ entities:
         range:
         range:
           min: 0
           min: 0
           max: 86400
           max: 86400
+  - entity: text
+    translation_key: scene
+    category: config
+    hidden: true
+    dps:
+      - id: 25
+        type: hex
+        optional: true
+        name: value
+  - entity: switch
+    translation_key: do_not_disturb
+    category: config
+    hidden: unavailable
+    dps:
+      - id: 34
+        type: boolean
+        optional: true
+        name: switch
+      - id: 34
+        type: boolean
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true