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

Add support for MoesGo dimmer switch.

This is a different device than Moes dimmer switch already supported,
with slightly different config options.

Issue #927
Jason Rumney 2 лет назад
Родитель
Сommit
88d020b205
3 измененных файлов с 88 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 86 0
      custom_components/tuya_local/devices/moesgo_dimmer.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -330,3 +330,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [lageorgem](https://github.com/lageorgem) for contributing support for Loginovo TV sync backlights.
 - [jaymunro](https://github.com/jaymunro) for contributing support for Makegood dual switches.
 - [oleg-d](https://github.com/oleg-d) for assistance with support for Nedis outdoor cameras.
+- [ScottWoolven5](https://github.com/ScottWoolven5) for assistance with support for MoesGo dimmer switch.

+ 1 - 0
DEVICES.md

@@ -339,6 +339,7 @@ of device.
 - Lytmi Fantasy/Neo 3 HDMI sync backlight
 - Moes dimmer switch
 - Moes motion sensor lights (XZ-CGV3)
+- MoesGo dimmer switch
 - Space Dog Music Lamp
 - Tampa Magnetic LED System CD-TY-WY05
 

+ 86 - 0
custom_components/tuya_local/devices/moesgo_dimmer.yaml

@@ -0,0 +1,86 @@
+name: Dimmer switch
+products:
+  - id: bf450789b46e8ff48f9n6r
+    name: MoesGo dimmer switch
+primary_entity:
+  entity: light
+  dps:
+    - id: 1
+      type: boolean
+      name: switch
+    - id: 2
+      name: brightness
+      type: integer
+      range:
+        min: 10
+        max: 1000
+      mapping:
+        - scale: 3.92
+secondary_entities:
+  - entity: number
+    name: Minimum brightness
+    category: config
+    icon: "mdi:brightness-percent"
+    dps:
+      - id: 3
+        type: integer
+        name: value
+        unit: "%"
+        range:
+          min: 10
+          max: 1000
+        mapping:
+          - scale: 10
+  - entity: select
+    name: Light type
+    icon: "mdi:lightbulb-question"
+    category: config
+    dps:
+      - id: 4
+        type: string
+        name: option
+        mapping:
+          - dps_val: led
+            value: LED
+          - dps_val: incandescent
+            value: Incandescent
+          - dps_val: halogen
+            value: Halogen
+  - 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: Power on state
+    icon: "mdi:toggle-switch"
+    category: config
+    dps:
+      - id: 14
+        type: string
+        name: option
+        optional: true
+        mapping:
+          - dps_val: "off"
+            value: "Off"
+          - dps_val: "on"
+            value: "On"
+          - dps_val: "memory"
+            value: "Last state"
+  - entity: light
+    name: Backlight
+    category: config
+    dps:
+      - id: 26
+        type: boolean
+        name: switch