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

Add cli interface for yeelight devices #397

Merged
merged 1 commit into from
Oct 24, 2018
Merged

Conversation

rytilahti
Copy link
Owner

This extends yeelight support to allow controlling yeelight devices with miiocli, in case someone prefers this instead of using the developer mode.

Usage: miiocli yeelight [OPTIONS] COMMAND [ARGS]...

Options:
  --ip TEXT     [required]
  --token TEXT  [required]
  --help        Show this message and exit.

Commands:
  info                      Get miIO protocol information from the device.
  off                       Power off.
  on                        Power on.
  raw_command               Send a raw command to the device.
  set_brightness            Set brightness.
  set_color_temp            Set color temp in kelvin.
  set_default               Set current state as default.
  set_developer_mode        Enable or disable the developer mode.
  set_name                  Set an internal name for the bulb.
  set_save_state_on_change  Enable or disable saving the state on changes.
  status                    Retrieve properties.
  toggle                    Toggle bulb state.

This can also be helpful for those who want to enable the developer mode without installing the app and binding the bulb to the cloud. Slightly related to home-assistant/core#17699 this could use some documentation for potential users.

miio/yeelight.py Outdated
from enum import IntEnum
from typing import Tuple, Optional

from .click_common import command, format_output, EnumType

Choose a reason for hiding this comment

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

'.click_common.EnumType' imported but unused

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 73.133% when pulling 3e43c14 on extend_yeelight_support into 3a98ecb on master.

@coveralls
Copy link

coveralls commented Oct 24, 2018

Coverage Status

Coverage decreased (-0.03%) to 73.133% when pulling 493b323 on extend_yeelight_support into 3a98ecb on master.

@rytilahti rytilahti force-pushed the extend_yeelight_support branch from 3e43c14 to 493b323 Compare October 24, 2018 16:41
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.

Awesome!

@rytilahti rytilahti merged commit 14878ea into master Oct 24, 2018
@rytilahti rytilahti deleted the extend_yeelight_support branch October 24, 2018 18:03
@pieonboard
Copy link

Any chance to cut the 0.4.3 release?

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.

5 participants