Procházet zdrojové kódy

Add support for LSC Smart Connect garden spotlights

Issue #2480
Jason Rumney před 1 rokem
rodič
revize
d9053bad88

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -781,3 +781,4 @@ Further device support has been made with the assistance of users. Please consid
 - [Kenneth-Audenaert](https://github.com/Kenneth-Audenaert) for contributing support for Aygrochy ventilation duct fan.
 - [DutchKillerBee](https://github.com/DutchKillerBee) for assisting with support for Qlima D812 dehumidifier.
 - [dgcartersa](https://github.com/dgcartersa) for assisting with support for WL-RTCZ-05Z zigbee human presence sensor.
+- - [NonozgYtb](https://github.com/NonozgYtb) for assisting with support for LSC Smart Connect Garden spotlights.

+ 1 - 0
DEVICES.md

@@ -621,6 +621,7 @@ of device.
 - Loycco sound machine with nightlight (also sold as Momland nightlight with white noise)
 - Loginovo TV sync backlight
 - LSC Smart Connect CCT + RGB ceiling light
+- LSC Smart Connect garden spotlights
 - LSC smart connect RGB CCT lightbulb (similar to older generic bulbs, so may work for others)
 - Lytmi Fantasy/Neo 3 HDMI sync backlight
 - Malmbergs QS-WIFI-D02-TRIAC single dimmer module

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

@@ -0,0 +1,93 @@
+name: Lighting
+products:
+  - id: key8u54q9dtru5jw
+    name: LSC Smart Connect spots de jardin LED intelligents
+primary_entity:
+  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
+secondary_entities:
+  - entity: number
+    translation_key: timer
+    category: config
+    dps:
+      - id: 26
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: switch
+    name: Do not disturb
+    icon: "mdi:minus-circle"
+    category: config
+    dps:
+      - id: 34
+        type: boolean
+        name: switch