Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming: stick with yeelight_bs2 or should it be xiaomi_bslamp2? #7

Closed
mmakaay opened this issue Apr 14, 2021 · 3 comments
Closed

Naming: stick with yeelight_bs2 or should it be xiaomi_bslamp2? #7

mmakaay opened this issue Apr 14, 2021 · 3 comments

Comments

@mmakaay
Copy link
Owner

mmakaay commented Apr 14, 2021

The branding for this lamp is a bit of a mess on the internet, since it's offered both as "Xiaomi Mijia Bedside Lamp 2" and "Yeelight Bedside Lamp 2". When I bought mind, the name "Xiaomi" was nowhere to be found in the ordering process.
Yeelight appears to be the production company, whereas Xiaomi Mijia might be the actual intended brand for the device.
The device firmware identifies as "yeelink.light.bslamp2" BTW, just to make things

One pro of keeping "Xiaomi", would be that it fits nicely next to other xiaomi components that are already in ESPHome. These are all named like "xiaomi_". So when renaming the component, I would probably go for "xiaomi_bslamp2".

Any thoughts on this?

@bonuzzz
Copy link

bonuzzz commented Apr 15, 2021

I think it's better to rename to xiaomi because this lamp doesn't have anything related to yeelight. It's xiaomi mijia bedside lamp 2

@mmakaay
Copy link
Owner Author

mmakaay commented Apr 15, 2021

Okay, some info that I gathered:

The lamp's official name is "Mi Bedside Lamp II".
The lamp is made by Yeelight under the MIJIA brand.
The MIJIA brand is Xiaomi's smart home brand. The term "MIJIA" literally means Xiaomi Smart Home in Chinese.
It was established in 2016 and encompasses all the major smart home products released by Xiaomi under the brand.
Looking around, it looks like "Xiaomi MIJIA" is the most regular combination that is used as the brand name.

Based on all this, I would say it's indeed time to do some renaming in the code.
I'll go with "Xiaomi" and not "MIJIA" to be in line with all the other already implemented xiaomi_* components.

mmakaay pushed a commit that referenced this issue Apr 15, 2021
The reasoning behind this can be found in this issue:
#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.
@mmakaay
Copy link
Owner Author

mmakaay commented Apr 15, 2021

Okay, all done. The code has been updated to reflect the correct naming and the repository URL has been updated.
The old URLs will still work. Thanks GitHub, great feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants