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

Extend yeelight support #85

Merged
merged 2 commits into from
Oct 2, 2017
Merged

Extend yeelight support #85

merged 2 commits into from
Oct 2, 2017

Conversation

rytilahti
Copy link
Owner

@rytilahti rytilahti commented Oct 1, 2017

Adds more functionality and allows yeelights to be discovered.

  • set_developer_mode(bool) allows enabling and disabling the developer mode (necessary for python-yeelight etc.)
  • set_name(str) to set the internal name, note that this is not the same as shown in mobile apps
  • set_save_state_on_change(bool) to enable saving the current bulb state when doing modifications

Note: initialization still causes a warning to recommend python-yeelight, which offers a much nicer API. However, for some users the ability to activate the developer mode with this can be very useful.

@coveralls
Copy link

coveralls commented Oct 1, 2017

Coverage Status

Coverage increased (+2.06%) to 34.842% when pulling 4eea494 on extend_yeelight into a6a8ecd on master.

@coveralls
Copy link

coveralls commented Oct 1, 2017

Coverage Status

Coverage increased (+2.06%) to 34.842% when pulling 97d6484 on extend_yeelight into a6a8ecd on master.

Copy link
Collaborator

@syssi syssi left a comment

Choose a reason for hiding this comment

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

Could you please add an example response:

python3 ./mirobo --ip 192.168.130.xx --token ffff raw_command get_prop "['power','bright','ct','rgb','hue','sat','color_mode','name','lan_ctrl','save_state']"
['off', '1', '4000', '16777215', '359', '100', '1', '', '1', '0']

Looks good!

Adds more functionality and allows yeelights to be discovered.
* set_developer_mode(bool) allows enabling and disabling the developer mode (necessary for python-yeelight etc.)
* set_name(str) to set the internal name, note that this is not the same as shown in mobile apps
* set_save_state_on_change(bool) to enable saving the current bulb state when doing modifications
@rytilahti
Copy link
Owner Author

Added and fixed conflicts, merging!

@@ -11,18 +12,23 @@ class YeelightMode(IntEnum):

class YeelightStatus:
def __init__(self, data):
# ['power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'name', 'lan_ctrl', 'save_state']
# ['on', '100', '3584', '16711680', '359', '100', '2', 'name', '1', '1']

Choose a reason for hiding this comment

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

line too long (102 > 79 characters)

@@ -11,18 +12,23 @@ class YeelightMode(IntEnum):

class YeelightStatus:
def __init__(self, data):
# ['power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'name', 'lan_ctrl', 'save_state']

Choose a reason for hiding this comment

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

line too long (111 > 79 characters)

@rytilahti rytilahti merged commit 5d0f7bb into master Oct 2, 2017
@rytilahti rytilahti deleted the extend_yeelight branch October 2, 2017 08:21
@coveralls
Copy link

Coverage Status

Coverage increased (+1.9%) to 32.86% when pulling 0965c3d on extend_yeelight into db7e4fb on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+1.9%) to 32.86% when pulling 0965c3d on extend_yeelight into db7e4fb on master.

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

Successfully merging this pull request may close these issues.

4 participants