I tried the codebase against the new esp-idf 4 alpha code, and
the build didn't have exception handling enabled by default.
I saw no problems with modifying the code to not raise exceptions,
so I did so to be future-proof.
The exception cases were cases that should not happen anyway,
because the input that could trigger the exception has already
been validated on beforehand by the Python-based code generation.
Fixes#10
"When changing RGB color settings, while night light mode is active,
transitions don't look good. On many of the transitions, the light
level shows a significant drop."
This commit fully suppresses transitions when the light is in
night light mode.
Some people wanted to buy me beer, coffee and the like as a thank you for the work that I put into the ESPHome firmware code for the Xiaomi Mijia Bedside Lamp 2. Well, I don't say no to a beer, cheers! ;-)
The reasoning behind this can be found in this issue:
https://github.com/mmakaay/esphome-yeelight_bs2/issues/7
When you are already using a previous version of the firmware,
then note that the following changes are necessary:
* Update to the latest version of the custom component code.
* Rename your folder `custom_components/yeelight_bs2` to
`custom_components/xiaomi_bslamp2`
* Update your yaml config by changing all occurrences of `yeelight_bs2`
into `xiaomi_bslamp2`
The links to the github repository will remain functional after
the renaming operation, so it's not required to grab a fresh clone.