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

improve gateway light class #770

Merged
merged 11 commits into from
Jul 21, 2020
Merged

Conversation

starkillerOG
Copy link
Contributor

@starkillerOG starkillerOG commented Jul 19, 2020

cleanup the gateway light class and add missing functionality needed for HomeAssistint

  • added docstrings to explain all functionality.
  • now contains these functions:
    • rgb_status
    • night_light_status
    • set_rgb
    • set_night_light
    • set_rgb_brightness
    • set_night_light_brightness
    • set_rgb_color
    • set_night_light_color
    • set_rgb_using_name
    • set_night_light_using_name

cleanup the gateway light class and add missing functionality needed for HomeAssistint
@coveralls
Copy link

coveralls commented Jul 19, 2020

Coverage Status

Coverage decreased (-0.1%) to 73.717% when pulling 3a6de11 on starkillerOG:patch-16 into 0ca105d on rytilahti:master.

@starkillerOG
Copy link
Contributor Author

@rytilahti I just fully tested this code and works just fine.
I think this can be merged.

miio/gateway.py Show resolved Hide resolved
miio/gateway.py Outdated Show resolved Hide resolved
miio/gateway.py Outdated Show resolved Hide resolved
miio/gateway.py Show resolved Hide resolved
miio/gateway.py Outdated Show resolved Hide resolved
miio/gateway.py Outdated Show resolved Hide resolved
miio/gateway.py Outdated Show resolved Hide resolved
miio/gateway.py Outdated Show resolved Hide resolved
@starkillerOG
Copy link
Contributor Author

@rytilahti any more suggestions?

miio/gateway.py Outdated Show resolved Hide resolved
@starkillerOG
Copy link
Contributor Author

@rytilahti are the docstrings more clear now?

@starkillerOG
Copy link
Contributor Author

@rytilahti all test pass again.
Anything else I can improve on this?

miio/gateway.py Outdated Show resolved Hide resolved
miio/gateway.py Outdated Show resolved Hide resolved
miio/gateway.py Outdated Show resolved Hide resolved
miio/gateway.py Outdated Show resolved Hide resolved
miio/gateway.py Outdated Show resolved Hide resolved
Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's good to go after those minor changes :-)

edit: could you also make the title and the description of the PR a bit more detailed?

starkillerOG and others added 3 commits July 21, 2020 23:18
Co-authored-by: Teemu R. <tpr@iki.fi>
Co-authored-by: Teemu R. <tpr@iki.fi>
Co-authored-by: Teemu R. <tpr@iki.fi>
@starkillerOG starkillerOG changed the title cleanup gateway light class improve gateway light class Jul 21, 2020
@starkillerOG
Copy link
Contributor Author

@rytilahti done, ready to be merged

Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 👍

@rytilahti rytilahti merged commit eef6b36 into rytilahti:master Jul 21, 2020
xvlady pushed a commit to xvlady/python-miio that referenced this pull request May 9, 2021
* cleanup gateway light class

cleanup the gateway light class and add missing functionality needed for HomeAssistint

* process revieuw comments

* add valid color names to docstring

* update docstring

* Update class docstring

* fix linting

* fix black

* Update miio/gateway.py

Co-authored-by: Teemu R. <tpr@iki.fi>

* Update miio/gateway.py

Co-authored-by: Teemu R. <tpr@iki.fi>

* Update miio/gateway.py

Co-authored-by: Teemu R. <tpr@iki.fi>

* use Tuple type

Co-authored-by: Teemu R. <tpr@iki.fi>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants