-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
Add support for all Huizuo Lamps (w/ fans, heaters, and scenes) #881
Conversation
2. Changing "color_temp" instead of "level" during manipulation with color temperature
2. Updated based on PR#868
2. Add tests
Guys, RP is ready for review, if you have a time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, that's plenty of support for new devices in a single PR! 🥇 See some commentary inline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks! 🎉
@syssi, what do you think?
I accidentally saw that you requested two small changes. |
Good catch! |
…lahti#881) * Adding Huizuo basic support * Add huizuo.py to the repo * Update __init__.py to the latest version * Fix _LOGGER error * Enabling iSort in VSCode on Save * 1. Removed unnecessary click.argument calls 2. Changing "color_temp" instead of "level" during manipulation with color temperature * 1. Removed Huizuo from discovery - devices are not mdns discoverable 2. Updated based on PR#868 * Re-arranged color_temp parameter for better understanding * fixing linting issues * Added only example of JSON payload from the lamp * Updated README.rst, added separations * 1. Use MiotDevice class 2. Add tests * Fixing linting issues * Fixing linting issue - second try... * Processing comments from PR#868 * Updated the list of devices, updated status * fix wrong dict concatenation * Dict concat fix 2 * Update mapping and status output * Fix status issue * is_fan_reverse update * Added fan, heater, scene supports * Updated unit test * Update README.rst * Split by classes * Cut the basic status for lamp * pre-commit * Processing suggestions from PR#881 * Change the function name in scene management (request from PR rytilahti#881) * Simplifying code (removing unnecessary 'else' statements)
Inspired by previous work (PR #868), I checked specifications for all HUIZUO lamps, mentioned in the #627 [meta] list of miot-enabled devices. In general, almost all of them have a similar schema for light management, and some models have additionally a fan, heater, or predefined scenes.
Code for additional features was written based on official specifications.