Aqara Advanced Lighting custom integration

Releasing my new Aqara Advanced Lighting integration for the Aqara T1M Ceiling Light, T1 LED Strip, and T2 bulbs. It’s still in beta phase (v0.3.0) but has the base features implemented and is open for public testing.

Overview
Easily control Aqara lights more advanced of RGB dynamic effects, strip/ring individual segment control, color patterns, gradients and CCT sequences.

Features

  • Effect Presets - Quick access to 24 preset effects from the Aqara Home app
    • 4 T2 Bulb presets (Candlelight, Breath, Colorful, Security)
    • 9 T1M presets (Dinner, Sunset, Autumn, Galaxy, Daydream, Holiday, Party, Meteor, Alert)
    • 7 T1 Strip presets (Rainbow, Heartbeat, Gala, Sea of Flowers, Rhythmic, Exciting, Colorful)
  • Segment Pattern Presets - 12 T1M/T1 Strip segment color patterns from the Aqara Home app
  • Dynamic RGB Effects - Create custom effects with 13 different manual effects including breathing, fading, flowing, chasing, rainbow, and more
  • Effect Dropdown Selector - Easy-to-use UI dropdown showing all available effects and presets
  • RGB Color Pickers - Color picker UI for all services (up to 8 colors for effects, 6 for gradients)
  • Individual Segment Control - Set individual colors for each segment on T1M and T1 Strip lights
  • Smooth Color Gradients - Create custom color transitions across strip/ring segments with 2-6 colors
  • Color Block Patterns - Generate evenly spaced or alternating color blocks across the light’s strip/ring segments
  • Flexible Segment Selection - Support for ranges (“1-20”), individual segments, and special selectors (“odd”, “even”, “first-half”, "last-third etc)
  • CCT Dynamic Sequences - Create multi-step color temperature and brightness sequences with smooth transitions
  • T1 Strip Variable Length Support - Automatically detects and adapts to T1 Strip’s length (1-10 meters)
  • Light Group Support - All services work with Home Assistant light groups for synchronized multi-light control
  • Auto Turn-On Option - Optionally turn lights on automatically before applying effects or sequences
  • Unspecified Segment Control - Option to turn off segments not included in patterns
  • Automatic Device Discovery - Discovers supported Aqara lights through Zigbee2MQTT
  • Service-Based API - All features accessible via Home Assistant services, automations, and scripts

Usage

All features are available as Home Assistant services. Call these services from automations, scripts, or the Developer Tools.

Requirements

  • Home Assistant 2025.12.0 or newer (older versions not tested)
  • MQTT integration configured and running
  • Zigbee2MQTT 2.7.2 or newer

Full details on the Github page.

Please let me know what you think, thanks.

2 Likes

Respect for the work you’ve done. I’ve tested some of the features with the T1m flash, and it works great. For those like me who lack imagination, the presets are great.

1 Like

If you are looking for more, and I mean a lot more, check out Scene Presets on HACS. The scenes are all Philips Hue inspired but they work with any bulb. There is a UI to activate a scene or there are service actions that can be used in automations and scripts.

I don’t think those will work with these lights individual segments or effects.

Thanks, I’ll be adding more presets for both effects and segment patterns soon.

Correct, they just light up the whole light and don’t understand segments.

I use them with my T2 bulbs.

New in v.0.4.0

Frontend Panel

A new UI panel has been added to the Home Assistant sidebar for easy access to presets:

  • Sidebar Integration - Access the “Aqara Lighting” panel directly from the Home Assistant sidebar
  • UI Buttons - Interface for managing lights, effects, and sequences
  • Preset Buttons - Access to all effect and sequence presets
  • Built with Lit - Modern, lightweight web component framework for optimal performance
  • More features to be added soon

The panel provides a centralized location for controlling Aqara lights without needing to use the Developer Tools or create automations.

RGB Segment Sequences

Create animated segment patterns with the segment sequence feature:

Key Features:

  • Up to 20 Customizable Steps - Build multi-step sequences
  • Multiple Activation Patterns:
    • Sequential forward/reverse - Segments activate one by one
    • Random - Segments activate in random order
    • Simultaneous - All segments activate at once
  • Pattern Modes:
    • Gradient - Smooth color transitions across segments
    • Blocks (repeat/expand) - Evenly spaced color blocks
    • Individual - Custom color per segment
  • Timing Control:
    • Duration - Time to complete the activation pattern
    • Hold - Time to hold after activation completes
  • Loop Options:
    • Run once, loop X times, or continuous loop
    • Choose to maintain state or turn off when complete
  • Pause and Resume - Control sequence playback mid-execution

New Services:

  • start_segment_sequence - Start an RGB segment sequence
  • stop_segment_sequence - Stop a running sequence
  • pause_segment_sequence - Pause a running sequence
  • resume_segment_sequence - Resume a paused sequence

CCT Sequence Enhancements

The existing CCT sequence feature has been enhanced with pause and resume functionality:

New Services:

  • pause_cct_sequence - Pause a running CCT sequence while maintaining current state
  • resume_cct_sequence - Resume a paused CCT sequence from where it was paused

Pleased to announce v0.5.0, a major feature release that brings frontend visual effect and pattern editors, and a preset management system. This release focuses on enhancing the frontend user experience with intuitive creation tools while maintaining full backend compatibility. Update via HACS, and be sure to hard refresh the browser to clear any cached previous version.

Enhanced Panel UI with Visual Editors

The sidebar panel now includes interactive visual editors for creating custom effects, patterns, and sequences:

  • Effect Editor - Create custom dynamic RGB effects
    • Effect type selector
    • Up to 8 color pickers for effect colors
    • Speed and brightness sliders
    • Segment selector for T1 Strip effects
    • Live preview of effect settings
    • Save as custom preset
  • Segment Pattern Editor - Design custom segment color patterns
    • Visual segment selector showing all available segments
    • Color picker for each segment or range
    • Gradient and block pattern generators
    • Turn off unspecified segments option
    • Save as custom preset
  • CCT Sequence Editor - Build multi-step CCT sequences
    • Up to 20 steps with visual timeline
    • Color temperature and brightness sliders for each step
    • Transition and hold duration controls
    • Loop mode and end behavior settings
    • Live step preview
    • Save as custom preset
  • RGB Segment Sequence Editor - Create animated segment sequences
    • Up to 20 steps with animation patterns
    • Multiple color modes (gradient, blocks, individual)
    • Activation pattern selector with 8 options (all at once, sequential forward/reverse, random, ping pong, centre out, edges in, paired)
    • Duration and hold controls
    • Loop settings with skip first step option
    • Clear segments before starting option
    • Save as custom preset

User Preset System

Create, save, and manage your own custom presets for all feature types:

  • Preset Management - Full CRUD operations for user-created presets
    • Create unlimited custom presets
    • Edit existing presets with full customization
    • Duplicate presets to create variations
    • Delete unwanted presets
  • Supported Preset Types - Save presets for all features
    • Effect presets (dynamic RGB effects with colors and settings)
    • Segment pattern presets (custom segment color arrangements)
    • CCT sequence presets (multi-step color temperature sequences)
    • RGB segment sequence presets (animated segment patterns)
  • Persistent Storage - Presets stored across Home Assistant restarts
    • Automatic save on creation/update/delete
    • UUID-based preset IDs for reliable tracking
    • Timestamps for created and modified dates to allow for sorting

This looks awesome, but I cannot seem to get it to work with using a MQTT broker thats running in a different docker container. Is it only usable for HASOS perhaps? where MQTT is running as an addon?

My setup is using Home Assistant inside a docker container, with zigbee2MQTT inside another container. both are communicating with MQTT running in another container. everything inside home assistant works (can control all my 65 zigbee devices and I see 2 T1M lights with 2.7.2 added segmentation exposed for these lights). the base topic is configured as zigbee2mqtt, but I dont see them popup in the HACS integration.

It should work fine, I’m running HA in a Docker container and have MQTT in a separate LXC and Zigbee2MQTT in another separate LXC. What errors are you seeing in logs?

In the integration, is the entity selector empty when you click the “Add target” button? You access the integration using “Aqara Lighting” in the HA sidebar menu.

I completely missed the part where a Aqara Lighting dashboard appeared where I need to select devices… haha. I thought I would see the aqara lights beneath the integration.
Thanks for the screenshot!

1 Like

Great! I’ll update the readme on Github with better clarification on accessing the integration.

1 Like

still struggling with this unfortunatly… I can select my T1M light, I can see all the options and things I could make, but whenever I set something to save, it just jumps to the “my Presets” tab and nothing happens.

When I try to restore a preset (I tried to restore one from the github source), it says Preset store not initialed

Is there something I need to configure for storage? should there be a folder thats not being created from installing it through HACS or something?

It seems like possibly the storage wasn’t configured properly when setting up the integration. Are there any errors in the HA logs? Try going to Settings-Integrations-Aqara Advanced Lighting-Reconfigure and see if there any log errors afterward.

The relevant log lines:

2026-01-15 16:26:03.423 INFO (MainThread) [custom_components.aqara_advanced_lighting] Unloading Aqara Advanced Lighting integration
2026-01-15 16:26:03.423 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service aqara_advanced_lighting/set_dynamic_effect
2026-01-15 16:26:03.423 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service aqara_advanced_lighting/stop_effect
2026-01-15 16:26:03.423 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service aqara_advanced_lighting/set_segment_pattern
2026-01-15 16:26:03.423 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service aqara_advanced_lighting/create_gradient
2026-01-15 16:26:03.423 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service aqara_advanced_lighting/create_blocks
2026-01-15 16:26:03.423 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service aqara_advanced_lighting/start_cct_sequence
2026-01-15 16:26:03.423 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service aqara_advanced_lighting/stop_cct_sequence
2026-01-15 16:26:03.423 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service aqara_advanced_lighting/pause_cct_sequence
2026-01-15 16:26:03.423 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service aqara_advanced_lighting/resume_cct_sequence
2026-01-15 16:26:03.423 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service aqara_advanced_lighting/start_segment_sequence
2026-01-15 16:26:03.424 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service aqara_advanced_lighting/stop_segment_sequence
2026-01-15 16:26:03.424 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service aqara_advanced_lighting/pause_segment_sequence
2026-01-15 16:26:03.424 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service aqara_advanced_lighting/resume_segment_sequence
2026-01-15 16:26:03.424 INFO (MainThread) [custom_components.aqara_advanced_lighting.services] Aqara Advanced Lighting services unloaded
2026-01-15 16:26:03.424 INFO (MainThread) [custom_components.aqara_advanced_lighting] Setting up Aqara Advanced Lighting integration with Z2M topic: zigbee2mqtt
2026-01-15 16:26:03.424 DEBUG (MainThread) [custom_components.aqara_advanced_lighting.mqtt_client] Subscribing to Z2M bridge devices: zigbee2mqtt/bridge/devices
2026-01-15 16:26:03.424 DEBUG (MainThread) [custom_components.aqara_advanced_lighting.mqtt_client] Requesting devices list from Z2M: zigbee2mqtt/bridge/request/devices
2026-01-15 16:26:03.426 DEBUG (MainThread) [custom_components.aqara_advanced_lighting.state_manager] Loaded 0 stored states from persistent storage
2026-01-15 16:26:03.426 INFO (MainThread) [custom_components.aqara_advanced_lighting] Aqara Advanced Lighting integration setup complete
2026-01-15 16:26:03.534 DEBUG (MainThread) [custom_components.aqara_advanced_lighting.mqtt_client] Received Z2M devices: 66

and all devices then gets skipped/mapped (where my T1M light then succesfully gets mapped)

I’ve just pushed a pre-release with possible fix. In HA go to Settings-Devices & Services-Devices-Aqara Advanced Lighting and enable Pre-release in the diagnostics, then update through HACS (click update information) to the v0.6.2-dev release.

1 Like

I installed v0.6.2-dev just now, and it works! Thanks allot

Fantastic! Thanks for the help bug fixing.