]> git.basschouten.com Git - openhab-addons.git/commitdiff
[miio] Add Yeelight W3 RGB (#16659)
authorMarcel <marcel@verpaalen.com>
Wed, 17 Apr 2024 16:54:27 +0000 (18:54 +0200)
committerGitHub <noreply@github.com>
Wed, 17 Apr 2024 16:54:27 +0000 (18:54 +0200)
* fix: Added Yeelight W3 RGB props

cherrypicked from #7717221

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
* [miio] update readme

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Co-authored-by: Igor Svehla <igor@taxtris.com>
bundles/org.openhab.binding.miio/README.md
bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java
bundles/org.openhab.binding.miio/src/main/resources/OH-INF/i18n/basic.properties
bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.color1.json

index 19f6baa3a264016256facf68a4a909118d4aed99..abe1121cbc7ed59deb05caa850715f90fae53a23 100644 (file)
@@ -505,6 +505,7 @@ Currently the miio binding supports more than 360 different models.
 | Yeelight LED Bulb 1S(Color)        | miio:basic       | [yeelink.light.color4](#yeelink-light-color4) | Yes          |            |
 | Mi Smart LED Bulb Essential (White and Color) | miio:basic       | [yeelink.light.color5](#yeelink-light-color5) | Yes          |            |
 | Yeelight Smart LED Bulb 1SE (color) | miio:basic       | [yeelink.light.colora](#yeelink-light-colora) | Yes          |            |
+| Yeelight Smart LED Bulb W3 (color) | miio:basic       | [yeelink.light.colorb](#yeelink-light-colorb) | Yes          |            |
 | Yeelight LED Bulb (Tunable)        | miio:basic       | [yeelink.light.ct2](#yeelink-light-ct2) | Yes          |            |
 | Mi LED Desk Lamp                   | miio:basic       | [yeelink.light.lamp1](#yeelink-light-lamp1) | Yes          |            |
 | Mi Smart LED Desk Lamp Pro         | miio:basic       | [yeelink.light.lamp2](#yeelink-light-lamp2) | Yes          |            |
@@ -4403,6 +4404,19 @@ Note, not all the values need to be in the json file, e.g. a subset of the param
 | colorflow                  | Switch               | Color Flow                               |            |
 | name                       | String               | Name                                     |            |
 
+### Yeelight Smart LED Bulb W3 (color) (<a name="yeelink-light-colorb">yeelink.light.colorb</a>) Channels
+
+| Channel                    | Type                 | Description                              | Comment    |
+|----------------------------|----------------------|------------------------------------------|------------|
+| power                      | Switch               | Power                                    |            |
+| brightness                 | Dimmer               | Brightness                               |            |
+| delayoff                   | Number:Time          | Shutdown Timer                           |            |
+| colorTemperature           | Number               | Color Temperature                        |            |
+| rgbColor                   | Color                | RGB Color                                |            |
+| colorMode                  | Number               | Color Mode                               | Note, currently only supporting switching to RGB or CT mode. Value mapping `["0"="Default","2"="CT mode","1"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"]` |
+| colorflow                  | Switch               | Color Flow                               |            |
+| name                       | String               | Name                                     |            |
+
 ### Yeelight LED Bulb (Tunable) (<a name="yeelink-light-ct2">yeelink.light.ct2</a>) Channels
 
 | Channel                    | Type                 | Description                              | Comment    |
@@ -10736,6 +10750,22 @@ Switch colorflow "Color Flow" (G_light) {channel="miio:basic:light:colorflow"}
 String name "Name" (G_light) {channel="miio:basic:light:name"}
 ```
 
+### Yeelight Smart LED Bulb W3 (color) (yeelink.light.colorb) item file lines
+
+note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.
+
+```java
+Group G_light "Yeelight Smart LED Bulb W3 (color)" <status>
+Switch power "Power" (G_light) {channel="miio:basic:light:power"}
+Dimmer brightness "Brightness" (G_light) {channel="miio:basic:light:brightness"}
+Number:Time delayoff "Shutdown Timer" (G_light) {channel="miio:basic:light:delayoff"}
+Number colorTemperature "Color Temperature" (G_light) {channel="miio:basic:light:colorTemperature"}
+Color rgbColor "RGB Color" (G_light) {channel="miio:basic:light:rgbColor"}
+Number colorMode "Color Mode" (G_light) {channel="miio:basic:light:colorMode"}
+Switch colorflow "Color Flow" (G_light) {channel="miio:basic:light:colorflow"}
+String name "Name" (G_light) {channel="miio:basic:light:name"}
+```
+
 ### Yeelight LED Bulb (Tunable) (yeelink.light.ct2) item file lines
 
 note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.
index 308a357d3aea780b04fb8fca4b43f35dc8e2a4f0..61e652c400806adff8096df78898f46d4b6f025f 100644 (file)
@@ -356,6 +356,7 @@ public enum MiIoDevices {
     YEELINK_LIGHT_COLOR4("yeelink.light.color4", "Yeelight LED Bulb 1S(Color)", THING_TYPE_BASIC),
     YEELINK_LIGHT_COLOR5("yeelink.light.color5", "Mi Smart LED Bulb Essential (White and Color)", THING_TYPE_BASIC),
     YEELINK_LIGHT_COLORA("yeelink.light.colora", "Yeelight Smart LED Bulb 1SE (color)", THING_TYPE_BASIC),
+    YEELINK_LIGHT_COLORB("yeelink.light.colorb", "Yeelight Smart LED Bulb W3 (color)", THING_TYPE_BASIC),
     YEELINK_LIGHT_CT2("yeelink.light.ct2", "Yeelight LED Bulb (Tunable)", THING_TYPE_BASIC),
     YEELINK_LIGHT_LAMP1("yeelink.light.lamp1", "Mi LED Desk Lamp", THING_TYPE_BASIC),
     YEELINK_LIGHT_LAMP2("yeelink.light.lamp2", "Mi Smart LED Desk Lamp Pro", THING_TYPE_BASIC),
index a13c88959eae76737950dc4c2ad4d2a388ff75e9..853b58475593f6c37d5d96ba422a43685d0c4acc 100644 (file)
@@ -297,6 +297,7 @@ thing.yeelink.light.color3 = Mi LED Smart Bulb (White and Color)
 thing.yeelink.light.color4 = Yeelight LED Bulb 1S(Color)
 thing.yeelink.light.color5 = Mi Smart LED Bulb Essential (White and Color)
 thing.yeelink.light.colora = Yeelight Smart LED Bulb 1SE (color)
+thing.yeelink.light.colorb = Yeelight Smart LED Bulb W3 (color)
 thing.yeelink.light.ct2 = Yeelight LED Bulb (Tunable)
 thing.yeelink.light.lamp1 = Mi LED Desk Lamp
 thing.yeelink.light.lamp2 = Mi Smart LED Desk Lamp Pro
index 4cf86731c38d1950f9ceed7c8a5eb9d8b02c8598..e44f8be7ff9e18035ad1aefc074297da42976efb 100644 (file)
@@ -11,7 +11,8 @@
                        "yeelink.light.bslamp1",
                        "yeelink.light.bslamp2",
                        "yeelink.light.bslamp3",
-                       "yeelink.light.colora"
+                       "yeelink.light.colora",
+                       "yeelink.light.colorb"
                ],
                "maxProperties": 7,
                "channels": [