]> git.basschouten.com Git - openhab-addons.git/commitdiff
[Yeelight] Support of ceil26 and ceiling11 devices (#14668)
authorgoopilot <40123561+goopilot@users.noreply.github.com>
Mon, 10 Apr 2023 08:31:01 +0000 (03:31 -0500)
committerGitHub <noreply@github.com>
Mon, 10 Apr 2023 08:31:01 +0000 (10:31 +0200)
* Support of ceil26 and ceiling11 devices

Signed-off-by: Alexandr Salamatov <goopilot@gmail.com>
bundles/org.openhab.binding.yeelight/README.md
bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/discovery/YeelightDiscoveryService.java
bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/device/DeviceFactory.java
bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/enums/DeviceType.java
bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/services/DeviceManager.java

index 059864aaca7f997451d955be450cb8dcc5a253b0..0a2e925950c6462c210314b4fea343c0ce3e5125 100644 (file)
@@ -4,10 +4,16 @@ This binding integrates the [Yeelight Lighting Product](https://www.yeelight.com
 
 ## Supported Things
 
-- [Yeelight LED White Bulb](https://www.yeelight.com/zh_CN/product/wifi-led-w) (Thing type `dolphin`)
-- [Yeelight LED Color Bulb](https://www.yeelight.com/zh_CN/product/wifi-led-c) (Thing type `wonder`)
-- [Yeelight LED Color Stripe](https://www.yeelight.com/zh_CN/product/pitaya) (Thing type `stripe`)
-- [Yeelight LED Ceiling Light](https://www.yeelight.com/en_US/product/luna) (Thing type `ceiling`)
+| Device                                                                        | Thing type ID | Device model                      |
+|-------------------------------------------------------------------------------|---------------|-----------------------------------|
+| [Yeelight LED Ceiling Light](https://us.yeelight.com/category/ceiling-light/) | `ceiling`     | `ceiling`, `ceiling3`             |
+| [Yeelight LED Ceiling Light](https://us.yeelight.com/category/ceiling-light/) | `ceiling1`    | `ceiling1`, `ceiling11`, `ceil26` |
+| [Yeelight LED Ceiling Light](https://us.yeelight.com/category/ceiling-light/) | `ceiling4`    | `ceiling4`                        |
+| [Yeelight LED Color Bulb](https://us.yeelight.com/category/smart-bulb/)       | `wonder`      | `color`, `color4`                 |
+| [Yeelight LED White Bulb](https://us.yeelight.com/category/smart-bulb/)       | `dolphin`     | `mono`                            |
+| [Yeelight LED White Bulb v2](https://us.yeelight.com/category/smart-bulb/)    | `ct_bulb`     | `ct_bulb`                         |
+| [Yeelight LED Color Stripe](https://us.yeelight.com/category/led-strip/)      | `stripe`      | `stripe`, `strip6`                |
+| [Yeelight Mi LED Desk Lamp](https://us.yeelight.com/category/table-lighting/) | `desklamp`    | `desklamp`                        |
 
 ## Preconditions
 
index f2b61b5f19c8fb58ca1f247d6d7311c4f6732fe1..f43f7230d25267e3ddbf9271eeac846994c8ced4 100644 (file)
@@ -88,6 +88,8 @@ public class YeelightDiscoveryService extends AbstractDiscoveryService implement
             case ceiling3:
                 return new ThingUID(YeelightBindingConstants.THING_TYPE_CEILING, device.getDeviceId());
             case ceiling1:
+            case ceil26:
+            case ceiling11:
                 return new ThingUID(YeelightBindingConstants.THING_TYPE_CEILING1, device.getDeviceId());
             case ceiling4:
                 return new ThingUID(YeelightBindingConstants.THING_TYPE_CEILING4, device.getDeviceId());
@@ -113,6 +115,8 @@ public class YeelightDiscoveryService extends AbstractDiscoveryService implement
             case ceiling:
                 return YeelightBindingConstants.THING_TYPE_CEILING;
             case ceiling1:
+            case ceil26:
+            case ceiling11:
                 return YeelightBindingConstants.THING_TYPE_CEILING1;
             case ceiling3:
                 return YeelightBindingConstants.THING_TYPE_CEILING3;
index e283badcd48bfffd775b4c9408ded820e376d62d..c75dc3bc3c54add30b22fbe3dfacf9c690bc9389 100644 (file)
@@ -37,6 +37,8 @@ public class DeviceFactory {
                 return new CeilingDevice(id);
             case ceiling1:
             case ceiling3:
+            case ceil26:
+            case ceiling11:
                 return new CeilingDeviceWithNightDevice(id);
             case ceiling4:
                 return new CeilingDeviceWithAmbientDevice(id);
index 58f0f63106782bffeec9c76b1cf6db23ba7fcce6..6cabb1837a1d41287b674c12e5402dcdc8a483e7 100644 (file)
@@ -27,6 +27,8 @@ public enum DeviceType {
     ceiling1,
     ceiling3,
     ceiling4,
+    ceil26,
+    ceiling11,
     stripe,
     strip6,
     desklamp
index a962671c83624b5924188d36028a8e4fd07df163..091ed07d3a53701281c54b4ce0f50afb73de63fb 100644 (file)
@@ -335,6 +335,8 @@ public class DeviceManager {
                 return "Yeelight LED Ceiling";
             case ceiling1:
             case ceiling3:
+            case ceil26:
+            case ceiling11:
                 return "Yeelight LED Ceiling with night mode";
             case ceiling4:
                 return "Yeelight LED Ceiling with ambient light";