Skip to content

Commit

Permalink
[miio] Add Yeelight W3 RGB (openhab#16659)
Browse files Browse the repository at this point in the history
* fix: Added Yeelight W3 RGB props

cherrypicked from #7717221

Signed-off-by: Marcel Verpaalen <[email protected]>

* [miio] update readme

Signed-off-by: Marcel Verpaalen <[email protected]>

Co-authored-by: Igor Svehla <[email protected]>
  • Loading branch information
2 people authored and joni1993 committed Oct 15, 2024
1 parent ce85493 commit f66a80d
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
30 changes: 30 additions & 0 deletions bundles/org.openhab.binding.miio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | |
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down

0 comments on commit f66a80d

Please sign in to comment.