Closed sijk closed 3 years ago
The changes in 65edd60 provide the fix requested in #19. The supported traits can be configured in YAML so there's no need to modify the source.
@sijk Thanks! This is great! Let me do a quick review of it on my home system to make sure it doesn't completely blow up, but on the face of it the external_components feature is a huge step forward in terms of custom code usability.
I just merged this into the development branch, and I'll work on cutting a new release as a 2.0 since this ends up being a pretty major API change (for the better.) Thanks again!
@sijk Especially happy with your find on the UART to Serial conversion in components/climate.py
- I literally spent days trying to figure out how to do that cleanly using ye olde custom component.
ESPHome v1.18.0 introduced external components which makes it easier to define custom components without having to use lambdas to create them. This pull request makes it possible to use this repository as an external component, which substantially simplifies the necessary configuration.
You can test it by adding the following to your config:
Note that if you're modifying an existing config you should remove
esphome.libraries
andesphome.includes
and also delete the build folder to avoid 'multiple definition' linker errors.