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

feat (rgbw_lightbulbv2): merge in lscsmartconnect_gardenspotlights

- add compatible Feit ST2160 (Issue #4598)
- expand entities to cover full functionality

These two configs differed by one obscure entity each which wasn't
even fully exposed.
 - rgbw_lightbulbv2: dp 210 as "random_timing"
 - lscsmartconnect_gardenspotlights: dp 34 as do_not_disturb switch

Feit ST2160 was basically the same as lscsmartconnect_gardenspotlights,
with additional "remote_switch".

Make all entities available, hidden where unavailable.
Jason Rumney 3 дней назад
Родитель
Сommit
4f68feb31f

+ 0 - 88
custom_components/tuya_local/devices/lscsmartconnect_gardenspotlights.yaml

@@ -1,88 +0,0 @@
-name: Lighting
-products:
-  - id: key8u54q9dtru5jw
-    manufacturer: LSC Smart Connect
-    name: Spots de jardin LED intelligents
-entities:
-  - entity: light
-    dps:
-      - id: 20
-        type: boolean
-        name: switch
-      - id: 21
-        name: color_mode
-        type: string
-        mapping:
-          - dps_val: white
-            value: white
-          - dps_val: colour
-            value: hs
-          - dps_val: scene
-            value: Scene
-          - dps_val: music
-            value: Music
-      - id: 22
-        name: brightness
-        type: integer
-        range:
-          min: 10
-          max: 1000
-      - id: 24
-        name: rgbhsv
-        type: hex
-        format:
-          - name: h
-            bytes: 2
-            range:
-              min: 0
-              max: 360
-          - name: s
-            bytes: 2
-            range:
-              min: 0
-              max: 1000
-          - name: v
-            bytes: 2
-            range:
-              min: 0
-              max: 1000
-      - id: 25
-        type: string
-        name: scene_data
-      - id: 28
-        type: string
-        optional: true
-        name: control_data
-      - id: 30
-        type: string
-        optional: true
-        name: rhythm_mode
-      - id: 31
-        type: string
-        optional: true
-        name: sleep_mode
-      - id: 32
-        type: string
-        optional: true
-        name: wakeup_mode
-      - id: 33
-        type: string
-        optional: true
-        name: power_memory
-  - entity: time
-    translation_key: timer
-    category: config
-    dps:
-      - id: 26
-        type: integer
-        name: second
-        range:
-          min: 0
-          max: 86400
-  - entity: switch
-    translation_key: do_not_disturb
-    category: config
-    dps:
-      - id: 34
-        type: boolean
-        name: switch

+ 112 - 28
custom_components/tuya_local/devices/rgbw_lightbulbv2.yaml

@@ -1,10 +1,17 @@
 name: RGBW lightbulb
 name: RGBW lightbulb
+legacy_type: lscsmartconnect_gardenspotlights
 products:
 products:
   - id: dik6z7of4nailf94
   - id: dik6z7of4nailf94
   - id: jpbst6n8suqi3rcw
   - id: jpbst6n8suqi3rcw
     manufacturer: Feit
     manufacturer: Feit
     model: "3 panel RGBW garage light"
     model: "3 panel RGBW garage light"
     model_id: ADJ4000
     model_id: ADJ4000
+  - id: key8u54q9dtru5jw
+    manufacturer: LSC Smart Connect
+    name: Spots de jardin LED intelligents
+  - id: tyozpji0sspiobny
+    manufacturer: Feit
+    model: ST2160 RGBW filament bulb
 entities:
 entities:
   - entity: light
   - entity: light
     dps:
     dps:
@@ -48,34 +55,6 @@ entities:
             range:
             range:
               min: 0
               min: 0
               max: 1000
               max: 1000
-      - id: 27
-        name: music
-        type: string
-        optional: true
-      - id: 28
-        name: control_data
-        type: string
-        optional: true
-      - id: 30
-        name: rhythm_mode
-        type: string
-        optional: true
-      - id: 31
-        name: sleep_mode
-        type: string
-        optional: true
-      - id: 32
-        name: wakeup_mode
-        type: string
-        optional: true
-      - id: 33
-        name: power_memory
-        type: string
-        optional: true
-      - id: 210
-        name: random_timing
-        type: string
-        optional: true
   - entity: text
   - entity: text
     translation_key: scene
     translation_key: scene
     category: config
     category: config
@@ -123,3 +102,108 @@ entities:
         range:
         range:
           min: 0
           min: 0
           max: 86400
           max: 86400
+  - 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
+  - entity: text
+    name: Music
+    category: config
+    icon: "mdi:music"
+    hidden: true
+    dps:
+      - id: 27
+        type: string
+        optional: true
+        name: value
+
+  - entity: text
+    name: Control
+    category: config
+    icon: "mdi:tools"
+    hidden: true
+    dps:
+      - id: 28
+        type: string
+        optional: true
+        name: value
+  - entity: text
+    name: Rhythm
+    category: config
+    icon: "mdi:metronome"
+    hidden: true
+    dps:
+      - id: 30
+        type: base64
+        optional: true
+        name: value
+  - entity: text
+    name: Sleep
+    category: config
+    icon: "mdi:weather-night"
+    hidden: true
+    dps:
+      - id: 31
+        type: base64
+        optional: true
+        name: value
+  - entity: text
+    name: Wakeup
+    category: config
+    icon: "mdi:weather-sunset-up"
+    hidden: true
+    dps:
+      - id: 32
+        type: base64
+        optional: true
+        name: value
+  - entity: text
+    name: Power memory
+    category: config
+    icon: "mdi:power-settings"
+    hidden: true
+    dps:
+      - id: 33
+        type: base64
+        optional: true
+        name: value
+  - entity: switch
+    name: Remote
+    category: config
+    hidden: unavailable
+    dps:
+      - id: 41
+        type: boolean
+        optional: true
+        name: switch
+      - id: 41
+        type: boolean
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: text
+    name: Random schedule
+    category: config
+    icon: "mdi:island"
+    hidden: true
+    dps:
+      - id: 210
+        type: base64
+        optional: true
+        name: value