-
Notifications
You must be signed in to change notification settings - Fork 29
Area State
Magic Area's main goal is detecting an Area's current presence state. This is achieved by the means described on presence sensing, but we also track other secondary states to help out our features.
For each area, Magic Areas will scan the Area Registry and pull all the entities assigned to that area*. It will then create an binary_sensor.area_{area_name}
entity that will track the supported entities for presence sensing. Whenever one of those entities enter on of the supported states, the area is considered occupied
and this entity will have its state flipped to on
.
After all presence entities change to a non-presence state (e.g. off
), the Area will wait for a given time (configurable under Clear Timeout
) before flipping its state to off
(clear
).
(*) Note: MagicAreas only scans the area registry during load. If you make changes to the area registry (e.g. add a new entity to an area), you'll have to either change the area's configuration on the UI to force a reload or restart Home Assistant.
Magic Areas track other states related to the area apart of the main presence state. Those states are tracked by tracking specific entities (configurable) and our different features listen to those states.
The secondary states are:
-
dark
: Tracked byArea Light Sensor
-
sleep
: Tracked bySleep Entity
-
accented
: Tracked byAccent Entity
-
extended
: When occupied for more thanExtended Time
seconds
- Light Groups currently considers all secondary states to decide whether to turn lights on and which lights to turn on.
-
Climate Groups supports turning climate devices
on
when area is occupied or only when it enters theextended
state (default) - Area-Aware Media Player will only play media on areas which are on the selected secondary states.
📚 Concepts
🪄 How-To
✨ Features (view all)
- Light Groups
- Cover Groups
- Climate Groups
- Media Player Groups
- Aggregation
- Health Sensors
- Presence Hold
- Area-Aware Media Player
📒 Cookbooks (coming soon...)
- Controlling lights' brightness
- Automatic Turning on Fans
- Magic Areas and Alarmo