Closed TikiBill closed 7 months ago
Appreciate you doing this.
I'd probably recommend not doing anything with the -factory.yaml file. People should use the -update.yaml if they want a precompiled binary that they can upload to the bulb or preferably they should just use their own yaml that imports kauf-bulb.yaml as a package as in the below yaml. This is better because then you will continue to get any updates and not be stuck on an old version of the yaml
substitutions:
name: bedroom-lamp
friendly_name: Bedroom Lamp
packages:
kauf.rgbww: github://KaufHA/kauf-rgbww-bulbs/kauf-bulb.yaml
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Then you can !extend to add effects same as you have it.
Everything above "Adding Stock Effects" in the md file is one specific way of doing things, but anyone with the ESPHome dashboard can pretty much follow the rest of the directions and add effects the same way easily. For the "Adding Stock Effects" and lambda sections, that is the exact same for everyone with ESPHome dashboard installed. The above yaml is about what they get by default when they import a new bulb, then they can add the same !extend section. So I'd probably mention at the top that anyone with the dashboard already installed can just skip to the adding effects sections.
For the direct c++ development, are they meant to edit the base_light_effects.h file? Or is there a better way to do it?
If someone is just doing this on the ESPHome dashboard without following the first half of your directions, then they can just download the light component and put it in the ESPHome config directory under a components subfolder. Then that following yaml config is what they use to overwrite any of the default components with local versions. No need to re-import the common components. The good thing doing it this way is that you always get the latest common components rather than being stuck on a specific tag.
external_components:
- source:
type: local
path: ./components
Thank you for your feedback. I have merged your suggestions into the document.
Please note that I do not have ESPHome dashboard installed so the block-quote about the using the ESPHome dashboard is a best guess based on what you said. I punted by saying using the dashboard is outside of the scope of the document. Of course you should feel free to clarify anything after this is merged, or you can tell me specifically what to say.
Good day. Checking in if there are any other changes you would like to see in this pull request? Thanks.
Hey, sorry I've been ignoring this. It's been hectic here. I'll go ahead and merge it in and if I have any more edits later we can discuss.
Add a markdown document to clarify how to enable/add effects and point folks in the right direction for developing new ones.