Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Rewrite Osram Lightify component #22184
Originally there was another PR that contained all my changes to Osram Lightify component: #21176 . Now I'm splitting it to several smaller ones. This particular PR is only about rewriting existing code, no new features are being added here. Once this PR is merged, I will create the next ones with scenes support, exposing additional attributes, etc.
Original code has multiple flaws: it is not performance efficient, uses throttling incorrectly, implements status of light groups in a confusing way and does not take into account actual supported features of each device.
Now the module is re-implemented almost from scratch. At the same time I did my best to keep the new code 100% compatible with the old version not to break existing installations.
Summary of changes:
Please note that
Example entry for
This was referenced
Mar 19, 2019
amelchio left a comment
This looks quite good, you just copied a lot of stuff that is not needed.
A light platform does not have to handle all aliases, that is done in the core Light component.
@amelchio All I/O operations are expensive. And actually there are two timers not three:
Both configuration values are optional: default values should work fine for most users, but allow a space for fine-tuning. Personally I set
Cool, thanks. My concern is that if we first introduce this configuration, taking it out again in a cleanup would be a breaking change. So I'd rather not introduce it unless it is really needed. A little inflexibility is okay, Home Assistant does not try to solve all problems for everybody :)
@amelchio Well, in theory they may be the same. You might want to make
On the other hand, reusing
To be honest, I don't see a big issue in having
What do you think?
Okay, I see your problem. To really do this properly, we should make an