-
-
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
Extend yeelight support #85
Conversation
4eea494
to
97d6484
Compare
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.
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
Added and fixed conflicts, merging! |
97d6484
to
0965c3d
Compare
@@ -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'] |
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.
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'] |
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.
line too long (111 > 79 characters)
Adds more functionality and allows yeelights to be discovered.
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.