Skip to content

Extend yeelight support#85

Merged
rytilahti merged 2 commits intomasterfrom
extend_yeelight
Oct 2, 2017
Merged

Extend yeelight support#85
rytilahti merged 2 commits intomasterfrom
extend_yeelight

Conversation

@rytilahti
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Owner Author

Added and fixed conflicts, merging!

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']
Copy link
Copy Markdown

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)


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

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
Copy Markdown

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
Copy Markdown

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