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.
The indicator was not halfway when using 0.5 as the output value.
Also added an example of how the output could be wrapped in a
light component, to expose it to Home Assistant as a monochromatic
light. Not that useful probably, but a nice display of ESPHome's
flexibility.
The example.yaml now also updates the brightness indicator when
the light brightness changes. When switching the device to night
light mode, it will turn off the front panel illumation completely.
And last but not least: the example configuration now shows a way
to set the device to a random color when touching the color button.