๐ก Light Groups¶
The Light Groups feature in Magic Areas helps you organize and automate your lights intelligently and contextuallyโstarting with automatic light group creation and adding state-aware behavior for smarter automation.
โ Basic Functionality¶
At its simplest, this feature automatically creates a Home Assistant light group for each area using all light
entities assigned to it.
Warning
No group will be created if there are no light
entities in the area.
๐ Available Light Groups¶
You can classify your lights into predefined groups for specific purposes:
- Overhead Lights โ Main ceiling lights for general illumination.
- Accent Lights โ Decorative or highlight lighting (e.g., under cabinets, wall sconces).
- Task Lights โ Focused lights for workspaces, desks, or reading.
- Sleep Lights โ Dim lighting suitable for nighttime or bedtime use.
Each of these groupsโwhen populatedโautomatically gets a dedicated light.group
in Home Assistant.
They can also be linked to an area's secondary states (e.g., sleep
, accented
, extended
) for smarter automation.
Warning
๐ง To enable automation, turn on the Light Control ($Area)
switch created by Magic Areas.
โ๏ธ Configuration Options¶
Option | Type | Default | Description |
---|---|---|---|
Overhead lights | entity list | blank | Lights assigned to this group. |
States which this group should be on (Overhead lights) | list | occupied |
Area states that trigger this group. |
When should we control this light? (Overhead lights) | multi-choice | occupancy + state | occupancy triggers on clear โ occupied; state triggers on secondary state changes. |
Sleep lights | entity list | blank | Lights assigned to this group. |
States which this group should be on (Sleep lights) | list | occupied |
Area states that trigger this group. |
When should we control this light? (Sleep lights) | multi-choice | occupancy + state | Same behavior explanation as above. |
Accent lights | entity list | blank | Lights assigned to this group. |
States which this group should be on (Accent lights) | list | occupied |
Area states that trigger this group. |
When should we control this light? (Accent lights) | multi-choice | occupancy + state | Same behavior explanation as above. |
Task lights | entity list | blank | Lights assigned to this group. |
States which this group should be on (Task lights) | list | occupied |
Area states that trigger this group. |
When should we control this light? (Task lights) | multi-choice | occupancy + state | Same behavior explanation as above. |
๐ก Control Timing Notes:
- Occupancy only: Light group reacts when entering the room (clear โ occupied) but not if the area enters a secondary state while already occupied.
- State only: Light group reacts when a secondary state changes but not when first entering the room.
- Both selected (default): Reacts on room entry and secondary state changes.
๐ Automatic Control¶
Magic Areas can automatically turn lights on or off based on:
- Primary presence state:
occupied
orclear
- Secondary states:
dark
,extended
,sleep
, etc.
๐ The dark
State¶
If a dark
sensor is configured:
- Lights turn on only when the area is both occupied and dark.
- Otherwise, lights turn on anytime the area becomes occupied.
Note
โ If the area becomes dark while already occupied, lights will turn on immediately.
Dark State Behavior Matrix¶
Area State | Dark Configured? | Dark State | Lights Willโฆ |
---|---|---|---|
occupied |
โ No | N/A | Turn on |
occupied |
โ Yes | off |
Do nothing |
occupied |
โ Yes | on |
Turn on |
clear |
โ No | N/A | Turn off |
clear |
โ Yes | off |
Turn off |
clear |
โ Yes | on |
Turn off |
๐ก Automatically Turning Off Lights¶
When an area becomes clear
, all lights are turned off, regardless of secondary state.
Disable Light Control to override.
๐ How it Works¶
Light groups are tied to area states:
- States: Each group activates only when the area is in selected states (primary or secondary).
- Control timing: Decide if groups react on occupancy, secondary state changes, or both (recommended).
Example:
- Sleep Lights
set to occupancy only: will turn on when you enter a bedroom at night, but not if sleep
state activates while already inside.
- Accent Lights
set to state only: will turn on whenever the extended
state is activated, even if already inside.
๐ง Usage Examples¶
๐๏ธ TV ambiance with accent lights¶
- Group: Accent Lights
- State:
accented
- Trigger Mode:
state
(media player, for exmaple) - Why: Soft lighting during movie nights or relaxing evenings.
๐ค Nighttime routine in bedrooms¶
- Group: Sleep Lights
- State:
sleep
- Trigger Mode:
occupancy
- Why: Turn on softer lights when entering the room at night.
๐๏ธ Brightness and Color Temperature¶
Magic Areas does not control brightness or color temperature. Use integrations like:
These handle brightness/temperature better and are fully compatible with Magic Areas.