From: goopilot <40123561+goopilot@users.noreply.github.com> Date: Mon, 10 Apr 2023 08:31:01 +0000 (-0500) Subject: [Yeelight] Support of ceil26 and ceiling11 devices (#14668) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=14d6b3e4fe9f1a30845b878fbf1e195ba4aa15eb;p=openhab-addons.git [Yeelight] Support of ceil26 and ceiling11 devices (#14668) * Support of ceil26 and ceiling11 devices Signed-off-by: Alexandr Salamatov --- diff --git a/bundles/org.openhab.binding.yeelight/README.md b/bundles/org.openhab.binding.yeelight/README.md index 059864aaca..0a2e925950 100644 --- a/bundles/org.openhab.binding.yeelight/README.md +++ b/bundles/org.openhab.binding.yeelight/README.md @@ -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 diff --git a/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/discovery/YeelightDiscoveryService.java b/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/discovery/YeelightDiscoveryService.java index f2b61b5f19..f43f7230d2 100644 --- a/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/discovery/YeelightDiscoveryService.java +++ b/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/discovery/YeelightDiscoveryService.java @@ -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; diff --git a/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/device/DeviceFactory.java b/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/device/DeviceFactory.java index e283badcd4..c75dc3bc3c 100644 --- a/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/device/DeviceFactory.java +++ b/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/device/DeviceFactory.java @@ -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); diff --git a/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/enums/DeviceType.java b/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/enums/DeviceType.java index 58f0f63106..6cabb1837a 100644 --- a/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/enums/DeviceType.java +++ b/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/enums/DeviceType.java @@ -27,6 +27,8 @@ public enum DeviceType { ceiling1, ceiling3, ceiling4, + ceil26, + ceiling11, stripe, strip6, desklamp diff --git a/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/services/DeviceManager.java b/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/services/DeviceManager.java index a962671c83..091ed07d3a 100644 --- a/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/services/DeviceManager.java +++ b/bundles/org.openhab.binding.yeelight/src/main/java/org/openhab/binding/yeelight/internal/lib/services/DeviceManager.java @@ -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";