Configuring Yeelight for Police-Light Effect: A Fun Project!

Hey everyone, I wanted to share a fun project I recently worked on with my Yeelights. I’ve always been fascinated by the idea of creating a police-light effect with my smart lights, where the color fades up and down smoothly. Let me walk you through how I achieved this and maybe you can try it out too!

First, I set up my Yeelights with the following item configurations in my system:

Switch Light_YeeLight1_OnOff “Kugellampe” (gYeelight1,gLivingRoomLights_Switch) {channel=“yeelight:wonder:0x000000000531dd46:color”}
Color Light_Yeelight1_Color “Kugel Farbe” (gYeelight1,gLivingRoomLights_Color) {channel=“yeelight:wonder:0x000000000531dd46:color”}
Dimmer Light_Yeelight1_ColorDimmer “Kugel Farbestärke [%s]” (gYeelight1) {channel=“yeelight:wonder:0x000000000531dd46:color”}

Initially, I tried using the DECREASE and INCREASE commands for the dimmer, but I ran into an issue where the color would reset after a second. It turned out that the Color Item was overriding the Dimmer Item. To solve this, I adjusted the configuration to ensure both items work in harmony without conflicting.

What I ended up doing was using a rule to control the dimmer value directly, which allows the color to fade smoothly. This way, the police-light effect is achieved without any resets! It’s been a great addition to my home automation setup, especially for adding some fun during parties or Halloween.

If you’re interested in trying this out, I’d recommend starting with a simple rule to adjust the dimmer value and see how it works with your setup. It’s a bit of trial and error, but the result is totally worth it!

Let me know if you have any questions or if you’ve tried something similar with your Yeelights. Happy automating! :rotating_light::sparkles: