Explorar el Código

Add support for 1CH dimming module

Issue #1611
Jason Rumney hace 2 años
padre
commit
53dc8e9d7c

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -493,3 +493,4 @@ Further device support has been made with the assistance of users. Please consid
 - [BenJamesAndo](https://github.com/BenJamesAndo) for contributing support for Lexi Lighting string light WiFi adapters.
 - [LordPsycho202](https://github.com/LordPsycho202) for contributing support for Leo's Loo Too pet toilets.
 - [RoelDU](https://github.com/RoelDU) for assisting with support for Mirabella Genio Pixel oval lights.
+- [toposilva](https://github.com/toposilva) for assisting with support for 1CH dimmer modules.

+ 1 - 0
DEVICES.md

@@ -439,6 +439,7 @@ of device.
 - Generic dimmable/color temperature adjustable desktop lamp (confirmed with Setti+ SL601)
 - Generic "Dreamlight" RGBCW LED strips (tested with LSC RGBIC+CCT 2x5m LED strip)
 - Generic RGB only light bar - like the lights above, but no white light controls supported.
+- Unbranded 1CH dimmer module
 - A60 1800-2700K RGBWW light
 - Atomi smart color string light
 - Blitzwolf BW-LT31 LED strip

+ 69 - 0
custom_components/tuya_local/devices/dimming_1ch_switch.yaml

@@ -0,0 +1,69 @@
+name: Dimmer
+products:
+  - id: 5zsarybcltypoeaa
+    name: Single channel module
+primary_entity:
+  entity: light
+  dps:
+    - id: 1
+      type: boolean
+      name: switch
+    - id: 2
+      name: brightness
+      type: integer
+      range:
+        min: 10
+        max: 1000
+    - id: 3
+      type: integer
+      name: min_brightness
+    - id: 5
+      type: integer
+      name: max_brightness
+secondary_entities:
+  - entity: select
+    name: LED type
+    icon: "mdi:led-on"
+    category: config
+    dps:
+      - id: 4
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: kickback
+            value: Kickback
+          - dps_val: seesaw_toggle
+            value: Seesaw toggle
+          - dps_val: seesaw_sync
+            value: Seesaw sync
+  - entity: number
+    name: Timer
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 6
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: select
+    name: Initial state
+    icon: "mdi:toggle-switch"
+    category: config
+    dps:
+      - id: 14
+        type: string
+        name: option
+        mapping:
+          - dps_val: "on"
+            value: "On"
+          - dps_val: "off"
+            value: "Off"
+          - dps_val: memory
+            value: Last state