Skip to content
New issue

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

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

Already on GitHub? # to your account

Feat: Add support for ceiling lamps with "moonlight" mode #49

Merged
merged 5 commits into from
Dec 10, 2019
Merged

Feat: Add support for ceiling lamps with "moonlight" mode #49

merged 5 commits into from
Dec 10, 2019

Conversation

okonet
Copy link
Collaborator

@okonet okonet commented Dec 10, 2019

This PR adds support for Yeelight Ceiling Lamp that supports "moonlight" mode.

It works by adding a separate switch accessory to an existing light so night mode can be controlled and automated separately from brightness. It takes advantage of HomeKit merging accessories of one device into one card.

Closes #46

CleanShot 2019-12-10 at 15 35 44

Additionally, this PR adds lint-staged with automatic eslint --fix script to improve DX.

It is still cumbersome to please it so I'm wondering if we could deprecate it in favor of prettier. I can match formatting settings in prettier config. I don't see any benefits of using eslint config for checking code style. WYT?

@vieira
Copy link
Owner

vieira commented Dec 10, 2019

Hello @okonet,

Thanks for this! Looks good to me, although I don’t have a ceiling lamp with moonlight to test.

I will merge later today and release it if that’s ok with you.

Regarding prettier, I have only used once or twice but I had a good experience with it. I can see that it will provide a better developer experience if it can automate away the effort of conforming to a code style, especially with developers coming from projects with different code styles, etc.

@okonet
Copy link
Collaborator Author

okonet commented Dec 10, 2019

I’ll introduce prettier then. You could add me at npm so I could do releases myself or we could automate the process with The semantic release.

@vieira vieira merged commit b5ede22 into vieira:master Dec 10, 2019
@vieira
Copy link
Owner

vieira commented Dec 10, 2019

@okonet The help would be very welcome. I have added you as a collaborator in github and as a maintainer in npm.

edit: I have released a new version that includes this new feature as v1.1.0.

@IGI2
Copy link

IGI2 commented Dec 10, 2019

Hello guys!

First of all, great work! I love all your hard work.

However, something's wrong with this addition.
IMG_1296

I have Xiaomi Yeelight Meteorite (this to be exact https://www.gearbest.com/pendant-light/pp_009792951215.html) and the switch does not work.

https://streamable.com/pxzh0
https://streamable.com/rmum4

The switch does not control "the moonlight".

Logs: https://pastebin.com/uk2HzGFT

EDIT: Created the issue: #51

@github-actions
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Moonlight support on LED Ceiling Light
3 participants