Metadata-Version: 2.4
Name: xaal.yeelight
Version: 0.4.0
Summary: xAAL gateway for Yeelight devices
Author-email: Jerome Kerdreux <Jerome.Kerdreux@imt-atlantique.fr>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://recherche.imt-atlantique.fr/xaal/
Project-URL: Documentation, https://gitlab.imt-atlantique.fr/xaal/code/python/-/blob/main/devices/protocols/Yeelight/README.rst
Project-URL: Source, https://gitlab.imt-atlantique.fr/xaal/code/python/-/tree/main/devices/protocols/Yeelight
Keywords: xaal,yeelight
Classifier: Programming Language :: Python
Classifier: Topic :: Home Automation
Description-Content-Type: text/x-rst
Requires-Dist: xaal.lib
Requires-Dist: xaal.schemas
Requires-Dist: yeelight

xaal.yeelight
=============
This package provides a xAAL gateway for Yeelight lights. It supports most
Yeelight lights and bulbs. You have to enable local control on your
Yeelight device to use this package. You can do this by enabling the
"LAN Control" option in the Yeelight app.

The gateway loads bulbs from the configuration file and creates a xAAL
device for each of them. Check ``yeelight.ini`` after the first run to
see the devices created. A ``gateway.basic`` device is also registered
on the bus, tracking connected (embedded) and disconnected (inactive)
bulbs.

Notes
-----
This gateway uses the asyncio API provided by the Yeelight library
(``yeelight.aio.AsyncBulb``) and the xAAL ``AsyncEngine``.

Each bulb is connected via ``async_listen``, which auto-reconnects and
pushes property notifications in real time. The library also sends a
keepalive ping every 75 seconds, ensuring the connection stays alive
and detecting disconnected bulbs automatically.

Rate limiting is handled by a debounced ``sync()`` mechanism that avoids
unnecessary ``get_properties`` calls when push notifications have already
arrived.
