Browse Source

Add MiBoxer WL-Box2 2.4GHz Gateway (#4254)

* Add MiBoxer WL-Box2 2.4GHz Gateway

* Fixed MiBoxer WL-Box2 YAML

* Rename MiBoxer WL-Box2 to Lighting Controller

Edited name/products details

* feat (miboxer_wlbox2_lighting): naming changes

- include device type in config filename to make it easier for users to identify which configs might match their devices
- follow HA naming case convention
- do not name entities the same as the entity type, just leave the name out.

PR #4254

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Benedikt Ley 1 tháng trước cách đây
mục cha
commit
85ef823309

+ 74 - 0
custom_components/tuya_local/devices/miboxer_wlbox2_lighting.yaml

@@ -0,0 +1,74 @@
+name: Lighting controller
+products:
+  - id: "2vc0xj19d766eq0k"
+    manufacturer: "MiBoxer"
+    model: "WL-Box2"
+entities:
+  - entity: light
+    dps:
+      - id: 20
+        type: boolean
+        name: switch
+      - id: 22
+        type: integer
+        name: brightness
+        range:
+          min: 10
+          max: 1000
+      - id: 21
+        type: string
+        name: color_mode
+        mapping:
+          - dps_val: white
+            value: color_temp
+          - dps_val: colour
+            value: hs
+      - id: 23
+        name: color_temp
+        type: integer
+        optional: true
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - target_range:
+              min: 2700
+              max: 6500
+      - 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
+  - entity: number
+    name: Zone
+    mode: box
+    dps:
+      - id: 107
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 100
+  - entity: time
+    translation_key: timer
+    dps:
+      - id: 26
+        type: integer
+        name: second
+        range:
+          min: 0
+          max: 86400