[miio] Add Yeelight W3 RGB (#16659)

* 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>
This commit is contained in:
Marcel 2024-04-17 18:54:27 +02:00 committed by GitHub
parent 7b690d6c89
commit b035bf3824
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 34 additions and 1 deletions

View File

@ -505,6 +505,7 @@ Currently the miio binding supports more than 360 different models.
| Yeelight LED Bulb 1SColor | 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.

View File

@ -356,6 +356,7 @@ public enum MiIoDevices {
YEELINK_LIGHT_COLOR4("yeelink.light.color4", "Yeelight LED Bulb 1SColor", 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),

View File

@ -297,6 +297,7 @@ thing.yeelink.light.color3 = Mi LED Smart Bulb (White and Color)
thing.yeelink.light.color4 = Yeelight LED Bulb 1SColor
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

View 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": [