Przeglądaj źródła

Add support for Asahom outdoor lights.

Issue #2255
Jason Rumney 1 rok temu
rodzic
commit
9d7be4c606

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -770,3 +770,4 @@ Further device support has been made with the assistance of users. Please consid
 - [darth-hp](https://github.com/darth-hp) for contributing support for Cecotec BigDry 4000 dehumidifier.
 - [circa1665](https://github.com/circa1665) for assisting with support for Mypin 6L video pet feeder.
 - [egric](https://github.com/egric) for assisting with support for Neptun Smart water leak control system.
+- [dave-parsons](https://github.com/dave-parsons) for assisting with support for Asahom outdoor lights.

+ 1 - 0
DEVICES.md

@@ -589,6 +589,7 @@ of device.
 - Unbranded 1CH dimmer module
 - Unbranded dual dimmer module
 - A60 1800-2700K RGBWW light
+- Asahom S105A-C outdoor lighting
 - Atomi smart color string light
 - Blitzwolf BW-LT31 LED strip
 - Brizlabs string lights

+ 179 - 0
custom_components/tuya_local/devices/asahom_outdoor_rgbcw_lights.yaml

@@ -0,0 +1,179 @@
+name: Decorative lights
+products:
+  - id: wcx02kgo8o1qwaf8
+    name: Asahom S105A C
+primary_entity:
+  entity: light
+  dps:
+    - id: 20
+      type: boolean
+      name: switch
+    - id: 21
+      name: effect
+      type: string
+      mapping:
+        - dps_val: color
+          value: "off"
+        - dps_val: animation
+          value: Animation
+        - dps_val: music
+          value: Music
+        - dps_val: timer
+          value: Timer
+    - id: 22
+      name: brightness
+      type: integer
+      range:
+        min: 10
+        max: 1000
+    - id: 23
+      name: color_temp
+      type: integer
+      range:
+        min: 0
+        max: 1000
+      mapping:
+        - target_range:
+            min: 2700
+            max: 6500
+    - id: 24
+      name: rgbhsv
+      optional: true
+      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
+    - id: 27
+      type: string
+      optional: true
+      name: music_data
+    - id: 101
+      type: string
+      name: color_addressable
+    - id: 102
+      type: string
+      optional: true
+      name: color_favorite
+    - id: 103
+      type: string
+      optional: true
+      name: animation_preset
+    - id: 104
+      type: string
+      optional: true
+      name: animation_diy
+    - id: 106
+      type: integer
+      name: light_count
+    - id: 107
+      type: string
+      optional: true
+      name: animation_folder
+    - id: 108
+      type: string
+      optional: true
+      name: music_devicedata
+    - id: 109
+      type: string
+      optional: true
+      name: button_setting
+    - id: 110
+      type: string
+      optional: true
+      name: splitter_setting
+    - id: 111
+      type: integer
+      optional: true
+      name: color_brightness
+    - id: 116
+      type: string
+      optional: true
+      name: color_sync
+secondary_entities:
+  - entity: number
+    translation_key: timer
+    category: config
+    dps:
+      - id: 26
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            step: 60
+  - entity: light
+    translation_key: indicator
+    category: config
+    dps:
+      - id: 112
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Memory
+    category: config
+    dps:
+      - id: 113
+        type: boolean
+        optional: true
+        name: switch
+  - entity: switch
+    name: Remote pairing
+    icon: "mdi:remote"
+    category: config
+    dps:
+      - id: 114
+        type: boolean
+        optional: true
+        name: switch
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+      - id: 115
+        type: string
+        optional: true
+        name: information
+  - entity: select
+    name: Light mode
+    icon: "mdi:lightbulb-question"
+    category: config
+    dps:
+      - id: 117
+        type: string
+        name: option
+        mapping:
+          - dps_val: color
+            value: Color
+          - dps_val: fav
+            value: Favorite
+  - entity: switch
+    name: Color sync
+    category: config
+    dps:
+      - id: 118
+        type: boolean
+        name: switch
+  - entity: button
+    name: Reconfigure
+    category: config
+    dps:
+      - id: 105
+        type: boolean
+        optional: true
+        name: button