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

feat(cct_lightbulb): add optional DND switch

Issue #5305

Also break out the scene into a separate entity.
Jason Rumney пре 3 недеља
родитељ
комит
0ef99a8ba9
1 измењених фајлова са 26 додато и 4 уклоњено
  1. 26 4
      custom_components/tuya_local/devices/cct_lightbulb.yaml

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

@@ -40,10 +40,6 @@ entities:
           - target_range:
               min: 2700
               max: 6500
-      - id: 25
-        name: scene
-        type: hex
-        optional: true
   - entity: time
     translation_key: timer
     category: config
@@ -55,3 +51,29 @@ entities:
         range:
           min: 0
           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