Yeelight Pro is a Home Assistant custom integration for Yeelight Pro homes, devices, gateways, scenes, and runtime diagnostics. It supports Yeelight cloud, private deployment, and LAN gateway connection modes through one config flow.
- Current release:
v1.0.5, with the HACS zip assetyeelight_pro.zip - HACS default repository PR: #8516, under review
- Early access path: add this repository to HACS as a custom integration repository
- Minimum HACS metadata target: HACS
2.0.0, Home Assistant2024.1.0 - Verified tests and release gates: see docs/TEST_REPORT.md
- Enabled Home Assistant platforms: 11
- Runtime platforms:
binary_sensor,button,climate,cover,event,fan,light,number,select,sensor, andswitch - Update model: Polling remains the default full-state refresh path, with a
configurable interval. Cloud and private event notifications use the explicit
live_updatesWebSocket runtime.
- Cloud, private deployment, and LAN gateway setup in one config flow
- Yeelight APP scan-login setup through regional account APIs; QR-code login is the primary cloud login UX
- Advanced manual access-token setup for existing Yeelight Pro deployments
- Reauthentication flow for expired or invalid tokens
- Configurable polling interval, debug mode, unknown capability filtering, manual non-destructive device import filtering, live updates, LAN gateway control, and topology Repairs notifications
- Product schema loading from both v1 and v2 schema endpoints, merged conservatively for maximum capability coverage
- Persistent Home Assistant
.storageproduct schema cache for stable schema-aware projections across restarts - Canonical -> adapter -> converter -> projector -> entity architecture
- Lightweight Yeelight IoT registry for category, component, property, event,
protocol, and
nodeTypefacts - Device registry topology for gateways, child devices, scenes, groups, rooms, areas, and house-level helper entities
- House-level analytics diagnostic sensors for alarm, energy, user-action, and endpoint-health aggregates; optional analytics endpoint failures degrade to unavailable diagnostic values instead of blocking setup
- Home Assistant diagnostics export with allowlisted config, IoT registry health, spec-correction counts, canonical spec runtime inventory, entity-candidate counts, device-import preview, and aggregate runtime health
- Non-destructive device/entity import filtering: selected devices or manual rules only gate new device-sourced entity submissions, and do not delete, hide, migrate, or disable existing registry entries
- Real cloud device picker during setup and later options changes. If the device list cannot be loaded, setup can continue without enabling a filter and options keep the existing filter unchanged.
- Registry cleanup service with dry-run and audit-id confirmation; confirmed cleanup disables stale entities through Home Assistant's entity registry
- Debug services guarded by the
debug_modeoption - Read-only manual refresh service that refreshes loaded coordinators and reconciles Home Assistant device/entity registries
- English and Simplified Chinese translations
Use this path while HACS default repository PR #8516 is still under review. The flow follows HACS' custom repository model: add a repository URL, choose the correct repository type, then download the integration from HACS.
Requirements:
- Home Assistant
2024.1.0or later - HACS
2.0.0or later - A Home Assistant backup before installing any custom integration
Quick path:
- Click the Open your Home Assistant instance and add this repository to HACS button above.
- Confirm the repository in Home Assistant.
- Make sure the category is Integration.
- Install Yeelight Pro from HACS.
- Restart Home Assistant.
- Go to Settings -> Devices & services -> Add integration.
- Search for Yeelight Pro and start configuration.
Manual custom repository path:
-
Open Home Assistant.
-
Go to HACS.
-
Click the three-dot menu in the upper-right corner.
-
Select Custom repositories.
-
In Repository, enter:
https://github.com/Yeelight/ha_yeelight_pro -
In Type, select Integration.
-
Click Add.
-
Search for Yeelight Pro in HACS.
-
Open the repository page and click Download. Choose the latest release if HACS asks for a version.
-
Restart Home Assistant.
-
Go to Settings -> Devices & services -> Add integration.
-
Search for Yeelight Pro and start configuration.
If the integration does not appear after restart, refresh the browser cache and
check that HACS installed it under your Home Assistant configuration directory
as custom_components/yeelight_pro/.
Useful references:
- HACS custom repositories: https://www.hacs.xyz/docs/faq/custom_repositories/
- HACS integration repositories: https://www.hacs.xyz/docs/use/repositories/type/integration/
This path is for local development or QA, not for ordinary HACS users.
python3 scripts/sync_local_ha_runtime.py --config-dir /path/to/homeassistant/configThen restart Home Assistant and go to Settings -> Devices & services -> Add integration -> Yeelight Pro.
Do not copy the whole source directory into Home Assistant. The sync script copies runtime files only and excludes tests, caches, and generated artifacts.
- Select Yeelight Pro cloud mode.
- Select the Yeelight account region: CN, SG, US, or DE.
- Use Yeelight APP 1.5.0 or later to scan the QR code shown by Home Assistant. Home Assistant keeps polling until the app grants the token or the five-minute QR code expires.
- Select a house returned by the API.
- Optionally adjust the device picker before finishing setup.
Manual Access Token setup remains available as an advanced fallback.
- Select private deployment mode.
- Enter the private server address.
- Enter an Access Token and House ID.
- Optionally configure a private WebSocket push URL in options.
- Select LAN gateway mode.
- Enter gateway host, port, and product id when known.
- If
local_gateway_controlis enabled later and no host is configured, the runtime performs one documented UDP discovery attempt before opening the TCP gateway session.
The table lists Yeelight IoT categories and their current Home Assistant projections. A category row means the integration has a projection strategy for that category; it does not mean every SKU exposes every manufacturer-app feature in Home Assistant.
| Yeelight category | Default HA projection | Status |
|---|---|---|
light |
light |
Stable |
contact_sensor |
binary_sensor + event/device trigger when schema events exist |
Stable |
human_sensor |
binary_sensor + event/device trigger when schema events exist |
Stable |
light_sensor |
sensor |
Stable |
curtain |
cover |
Stable |
temp_control |
climate |
Stable |
relay_switch |
switch |
Stable |
scene_panel |
event + device trigger |
Stable |
gateway |
Device registry topology and diagnostics | Stable |
knob_switch |
event + device trigger |
Stable |
other |
Known read-only sensor fallback only | Conservative |
Cloud scenes are exposed as button entities that call Yeelight scene
execution.
See docs/IOT_SPEC_REGISTRY.md for the registry boundary and release mapping contract.
Open the integration options to configure:
- Polling interval: 10-300 seconds, default 30 seconds
- Debug mode: enables guarded debug services
- Hide unknown entities: keeps unmapped or low-confidence capabilities from being exposed as generic entities
- Device import filtering: edit conservative manual rules, or for cloud entries reopen the real device picker to adjust selected devices after setup
- Live updates: cloud/private entries use the explicit
live_updatesWebSocket runtime. Polling remains the default full-state refresh path. - Private push URL: private entries can override the WebSocket push endpoint
- Local gateway control: LAN entries can configure gateway host and port
- Topology change Repairs: creates a Home Assistant Repairs issue with aggregate and sanitized diff counts when device/entity topology changes after setup; enabled by default
Batch assign Home Assistant areas to Yeelight Pro devices.
Assign areas based on room keywords in device names.
Emit a normalized Yeelight Pro runtime event for development and
troubleshooting. This service requires debug_mode to be enabled in
integration options.
Write aggregate WebSocket push health to the Home Assistant debug log for
development and troubleshooting. This service requires debug_mode to be
enabled.
Inject a synthetic property push payload into the runtime bridge. This service
requires debug_mode to be enabled and does not control a real device.
Refresh loaded Yeelight Pro data immediately and run device/entity registry
reconciliation. Optional entry_id limits the refresh to one config entry.
Optional refresh_product_schemas refreshes product schemas and falls back to
cached schemas if the refresh fails.
Run a dry-run stale entity registry cleanup preview. Confirmation requires the
same entry_id and returned audit_id; confirmed cleanup disables stale
entities through Home Assistant's entity registry.
- Region and account isolation is entry based: each cloud account, region, and house combination creates its own Home Assistant config entry.
- Product schema completeness is prioritized by reading and merging both v1 and v2 schema responses when available.
- Cloud event notifications use the explicit
live_updatesWebSocket runtime. Private deployment entries use the same runtime with an optional private push URL. Polling remains the default full-state refresh path. - LAN gateway control is available through LAN-mode entries and is controlled
by the
local_gateway_controloption. - Device import filtering combines diagnostics preview, manual option rules, setup/options real device picker selections, and a conservative gate before new device-sourced entities are submitted.
- Registry cleanup is exposed as an explicit dry-run plus audit-id confirmation service that disables stale entities through Home Assistant's registry.
- This integration does not expose unsupported or unknown writable capabilities as generic switches, selects, numbers, text entities, or buttons.
- Unknown scalar properties may only become conservative read-only sensors when the relevant option allows them.
- Device import filtering does not clean, remove, disable, hide, or migrate existing entities or devices.
- Debug services are disabled unless
debug_modeis enabled. - Guarded production probes require explicit confirmation flags and must remain fail-closed without them.
cd extensions/ha_yeelight_pro
pytest -q
python3 -m compileall -q custom_components/yeelight_pro scripts hacs_publish.py
ruff check custom_components/yeelight_pro scripts hacs_publish.py
mypy --ignore-missing-imports --explicit-package-bases --exclude custom_components/yeelight_pro/tests custom_components/yeelight_pro scripts hacs_publish.py
python3 validate_hacs.py
python3 scripts/check_release_zip.py
python3 scripts/sync_local_ha_runtime.py
python3 scripts/verify_local_ha.py
python3 scripts/verify_local_ha_soak.py
python3 scripts/verify_local_ha_recovery.pyGuarded production probes are available for authorized external validation and must remain fail-closed without their explicit confirmation flags:
python3 scripts/verify_push_websocket.py
python3 scripts/verify_scan_login.py
python3 scripts/verify_cloud_devices.py
python3 scripts/verify_lan_gateway.pyCI/release entrypoints are kept in .github/workflows/test.yaml,
.github/workflows/validate.yaml, and .github/workflows/release.yaml.
Do not commit tokens, Home Assistant credentials, personal house IDs, or raw device data. Use sanitized fixtures for tests.
MIT License