KaufHA / kauf-rgbww-bulbs

Files for the KAUF RGBWW Smart Bulbs
39 stars 18 forks source link

Make Effect Selection Friendly to Effect Developers #54

Closed TikiBill closed 6 months ago

TikiBill commented 6 months ago

When playing around with developing effects, it is nice to have the effect selectable within the integrated web page and HomeAssistant. This change makes it more obvious how to to achieve that end. It also adds more aggressive effect disabling by always disabling any active effect on change.

Side note: I'll write up a tutorial on creating effects in markdown in the next week.

bkaufx commented 6 months ago

If you add an effect through the normal means, it should show a drop-down with the light entity in the built-in web interface. Are you seeing that? Is there some reason why this PR is better? Do you just like having it as a separate entity? I'm not really against this but just making sure there is a reason for it.

The select entity I created was just because I couldn't figure out at the time how to implement DDP as a normal effect on the light entity. It's a select instead of a switch just on the off chance I ever implemented additional non-effect effects. In the long run I was planning on using my DDP component/effect and getting rid of the current select entity after deprecating it for a year or so.

In case it helps you, and anyone else that sees this, here is how you add an effect when using the yaml packages. I think I will put this on the bulb's readme.

light:
  - id: !extend  kauf_light
    effects:
      - flicker:
          alpha: 94%
          intensity: 12%
      - strobe:
      - pulse:
      - random:
TikiBill commented 6 months ago

Heh user error: I finally noticed the effect in the web console as well as within HomeAssistant. And given the information you provided, I'll close this PR.

I still plan on writing up a step-by-step guide for adding an effect.