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

Add support for RGB-only light bars.

Issue #1282
Jason Rumney 2 лет назад
Родитель
Сommit
0f3f5049ec
3 измененных файлов с 73 добавлено и 1 удалено
  1. 1 1
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 71 0
      rgb_light_bar.yaml

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -193,7 +193,7 @@ Further device support has been made with the assistance of users.  Please consi
 - [drudgebg](https://github.com/drudgebg) for contributing support for Teckin SS42 outdoor double smartplug.
 - [saotthon](https://github.com/saotthon) for assisting with support for BVF CP1 heaters.
 - [MarciPain](https://github.com/MarciPain) for contributing support for PGST temperature and humidity sensors, Orion OWH-PTC2000 heaters and BlitzWolf SHP6 smartplugs.
-- [fischrobi](https://github.com/fischrobi) for assisting with support for Blitzwolf BW-SH2 humidifiers and MultiIR zigbee temperature/humidity sensors.
+- [fischrobi](https://github.com/fischrobi) for assisting with support for Blitzwolf BW-SH2 humidifiers, MultiIR zigbee temperature/humidity sensors and RGB-only light bars.
 - [elninosi](https://github.com/elninosi) for assisting with support for LoraTap curtain switches.
 - [mrulke](https://github.com/mrulke) for assisting with support for CCB-11 blind controllers.
 - [Codeazure](https://github.com/Codeazure) for assisting with support for 4-way power monitoring powerstrips (via Kogan 3-way + USB powerstrip).

+ 1 - 0
DEVICES.md

@@ -393,6 +393,7 @@ of device.
 - Generic RGBCW/RGBWW lightbulb (confirmed with Lijun branded bulb, expected to match others also). Three versions - standard dps layout starting from 20, with and without scene/music modes and timer, and a non-standard layout starting from 1 but following the same pattern (tested with "A60" bulbs).
 - Generic RGBW lightbulb in the standard and non-standard patterns above but without color temperature control.
 - Generic dimmable/color temperature adjustable desktop lamp (confirmed with Setti+ SL601)
+- Generic RGB only light bar - like the lights above, but no white light controls supported.
 - A60 1800-2700K RGBWW light
 - Atomi smart color string light
 - Blitzwolf BW-LT31 LED strip

+ 71 - 0
rgb_light_bar.yaml

@@ -0,0 +1,71 @@
+name: RGB light
+products:
+  - id: kteusapswadn9pf5
+    name: Ambient light bar
+primary_entity:
+  entity: light
+  dps:
+    - id: 20
+      type: boolean
+      name: switch
+    - id: 21
+      name: effect
+      type: string
+      mapping:
+        - dps_val: colour
+          value: RGB
+        - dps_val: scene
+          value: Scene
+        - dps_val: music
+          value: Music
+    - 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
+    - id: 27
+      type: string
+      name: music_data
+      optional: true
+    - id: 51
+      type: string
+      name: dreamlight_scene
+      optional: true
+    - id: 52
+      type: string
+      name: dreamlight_music_data
+      optional: true
+    - id: 101
+      type: string
+      name: dreeamscene_data
+      optional: true
+secondary_entities:
+  - entity: number
+    name: Timer
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 26
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 86400
+        mapping:
+          - scale: 60
+            steep: 60