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

Update device name and details for LEDVANCE light (#5464)

* Update device name and details for LEDVANCE light

Add support for LEDVANCE SMART+ WiFi Planon Magic

Adds a device profile for the LEDVANCE SMART+ WiFi Planon Magic LED panel light.

Tested with local discovery productKey keyj3w8cmutjmwk5.

Working features:
- Switch
- Brightness
- Color temperature, 2700-6500K
- RGB/HSV color
- Countdown timer
- Light pixel count diagnostic sensor

The device is paired through the LEDVANCE SMART+ app, so the product identifier comes from local Tuya discovery productKey instead of Tuya Cloud.

* fix(ledvance_smartwifiplanonmagic_light): naming

- File rename to follow brand_model_type convention
- Top level name should be generic

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Cyrelion 6 дней назад
Родитель
Сommit
86dbb33d45

+ 80 - 0
custom_components/tuya_local/devices/ledvance_smartwifiplanonmagic_light.yaml

@@ -0,0 +1,80 @@
+name: Ceiling light
+products:
+  - id: keyj3w8cmutjmwk5
+    manufacturer: LEDVANCE
+    model: SMART+ WiFi Planon Magic 36W
+entities:
+  - entity: light
+    icon: "mdi:ceiling-light"
+    dps:
+      - id: 20
+        type: boolean
+        name: switch
+      - id: 21
+        type: string
+        name: color_mode
+        mapping:
+          - dps_val: white
+            value: color_temp
+          - dps_val: colour
+            value: hs
+          - dps_val: scene
+            value: scene
+          - dps_val: music
+            value: music
+      - id: 22
+        type: integer
+        name: brightness
+        range:
+          min: 10
+          max: 1000
+      - id: 23
+        type: integer
+        name: color_temp
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - target_range:
+              min: 2700
+              max: 6500
+      - id: 24
+        type: hex
+        name: rgbhsv
+        optional: true
+        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
+
+  - entity: time
+    translation_key: timer
+    category: config
+    dps:
+      - id: 26
+        type: integer
+        name: second
+        range:
+          min: 0
+          max: 86400
+
+  - entity: sensor
+    name: Light pixel count
+    icon: "mdi:led-strip-variant"
+    category: diagnostic
+    dps:
+      - id: 47
+        type: integer
+        name: sensor