瀏覽代碼

Add support for EZValo Smart Desk Lamp (#4069)

* Add support for EZValo Smart Desk Lamp

Added support for https://www.ezvaloledlight.com/product-category/smart-desk-lamp/, including: 

• Power On/Off of the light
• Dimmer
• Color Temperature
• "Auto" Color/Temperature mode
• Timer (for shutdown) - limited to 4 hours (240 minutes)

* Rename Auto Brightness and Color Mode to switch

Fixed a bug that wasn't present when submitted - fixing now.

* Refactor Ezvalo Smart Desk Lamp YAML configuration

Updated the name and formatting for the Ezvalo Smart Desk Lamp configuration.
Move to the correct folder

PR #4069

* Fix formatting in ezvalo_smart_desklamp.yaml

* feat (ezvalo_smart_desklamp): Rename 'Auto mode' to 'Auto dimming'

Based on description at https://www.amazon.com/EZVALO-Dimmable-Eye-Caring-Lighting-Adjustable/dp/B0BQMNMYM2

PR #4069

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Aminorjourney 2 月之前
父節點
當前提交
07da585400
共有 1 個文件被更改,包括 48 次插入0 次删除
  1. 48 0
      custom_components/tuya_local/devices/ezvalo_smart_desklamp.yaml

+ 48 - 0
custom_components/tuya_local/devices/ezvalo_smart_desklamp.yaml

@@ -0,0 +1,48 @@
+name: Desk lamp
+# products:
+#   - id: UNKNOWN
+#     manufacturer: Ezvalo
+#     model: Smart Desk Lamp
+entities:
+  - entity: light
+    dps:
+      - id: 20
+        type: boolean
+        name: switch
+      - id: 22
+        name: brightness
+        type: integer
+        range:
+          min: 5
+          max: 1000
+      - id: 23
+        name: color_temp
+        type: integer
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - target_range:
+              min: 2700
+              max: 6500
+
+  - entity: switch
+    name: Auto dimming
+    dps:
+      - id: 102
+        type: boolean
+        name: switch
+
+  - entity: number
+    translation_key: timer
+    class: duration
+    category: config
+    dps:
+      - id: 103
+        type: integer
+        name: value
+        unit: min
+        optional: true
+        range:
+          min: 0
+          max: 240