{"id":15371360,"url":"https://github.com/codingjoe/yeelib","last_synced_at":"2025-04-15T14:05:30.200Z","repository":{"id":54658044,"uuid":"116488400","full_name":"codingjoe/yeelib","owner":"codingjoe","description":"Python library for Xiaomi Mi Yeelight.","archived":false,"fork":false,"pushed_at":"2021-02-05T12:48:20.000Z","size":35,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T14:05:24.230Z","etag":null,"topics":["asyncio","home-automation","python","smart-lights","smarthome","xiaomi","yeelight"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codingjoe.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-06T14:16:05.000Z","updated_at":"2021-02-05T12:47:55.000Z","dependencies_parsed_at":"2022-08-13T23:01:09.390Z","dependency_job_id":null,"html_url":"https://github.com/codingjoe/yeelib","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingjoe%2Fyeelib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingjoe%2Fyeelib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingjoe%2Fyeelib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingjoe%2Fyeelib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codingjoe","download_url":"https://codeload.github.com/codingjoe/yeelib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249085439,"owners_count":21210267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","home-automation","python","smart-lights","smarthome","xiaomi","yeelight"],"created_at":"2024-10-01T13:46:35.524Z","updated_at":"2025-04-15T14:05:30.182Z","avatar_url":"https://github.com/codingjoe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"|version| |ci| |coverage| |license|\n\nyeelib\n======\n\n**Python library for Xiaomi Mi Yeelight.**\n\n``yeelib`` is an ``asyncio`` based Python library to control Yeelights.\nIt has no external dependencies and is blazing fast!\n\n\nGetting Started\n---------------\n\nInstall\n\n.. code:: shell\n\n    pip install yeelib\n\nExample:\n\n.. code:: python\n\n    import asyncio\n\n    from yeelib import search_bulbs\n\n\n    @asyncio.coroutine\n    def turn_all_lights_on(bulbs):\n        while True:\n            for b in bulbs.values():\n                asyncio.Task(b.send_command(\"set_power\",\n                                            [\"off\", \"sudden\", 40]))\n            yield from asyncio.sleep(10)\n\n\n    def main():\n        loop = asyncio.get_event_loop()\n        bulbs = loop.run_until_complete(search_bulbs())\n        loop.create_task(turn_all_lights_on(bulbs))\n        try:\n            loop.run_forever()\n        except KeyboardInterrupt:\n            loop.stop()\n\n\n    if __name__ == '__main__':\n        main()\n\nThe script above will turn all off every 10 seconds.\nThe following script does the same thing, but note how you can define the bulbs\nprior calling the ``search_bulbs`` context manager. This works due to the fact\nthat dictionaries are mutable in Python.\n\n\nSpecifications\n--------------\n\nFor more information check out the Yeelight developer documentation.\nhttp://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf\n\n.. |version| image:: https://img.shields.io/pypi/v/yeelib.svg\n   :target: https://pypi.python.org/pypi/yeelib/\n.. |ci| image:: https://api.travis-ci.org/codingjoe/yeelib.svg?branch=master\n   :target: https://travis-ci.org/codingjoe/yeelib\n.. |coverage| image:: https://codecov.io/gh/codingjoe/yeelib/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/codingjoe/yeelib\n.. |license| image:: https://img.shields.io/badge/license-Apache_2-blue.svg\n   :target: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingjoe%2Fyeelib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodingjoe%2Fyeelib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingjoe%2Fyeelib/lists"}