Skip to content

Simple Yeelight room control CLI written in Python. Control your lights from terminal.

License

Notifications You must be signed in to change notification settings

adamwojt/yee-cli

Repository files navigation

Yee CLI

https://brands.home-assistant.io/_/yeelight/logo.png

https://github.com/adamwojt/yee-cli/workflows/ci/badge.svg?branch=master&event=push https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336

Simple Yeelight Room control CLI written in Python. Control your lights from terminal.

Installation

pip install yee-cli

Config

  • Location: ~/.yee_rooms
  • Format: JSON
  • Example:
{
   "office":[
      "192.168.1.1",
      "192.168.1.2"
   ],
   "bedroom":[
      "192.168.1.3",
      "192.168.1.4"
   ]
}
  • Config path can be also passed with -c flag or YEE_ROOM_CONFIG env variable
  • To find bulb IPs use tools like nmap, nutty or check on your YeeLight app

Usage

yee [-c --config] [ROOM_NAME*] COMMAND [ARGS]...`

*Use room names from config

Example Usage:

yee bedroom on
yee bedroom dim 10
yee color_list
yee bedroom color indianred
... romance on !

Commands:

color         Set lights to given color.
color_list    Available color list
dim           Dim lights to level (1-100).
off           Turn lights off.
on            Turn lights on.
random_color  Switch to random color.
toggle        Toggle lights.

Troubleshooting

Connection Issues (make sure):
Other:

Credits

After writing almost all I realised that author of python-yeelight also wrote CLI. Check it out - it has different API / config and more features >>> yeecli