Magic Areas is a Home Assistant custom integration that makes your smart home think for itself through rock-solid presence tracking — the foundation for a truly smart home.
Magic Areas knows when a room is occupied (and when it’s not) and reacts automatically. It turns Home Assistant’s Areas into dependable, presence-aware zones so your home feels alive without you lifting a finger. Instead of building dozens of manual automations, let Magic Areas control your lights, climate, and other devices so that they do just right thing, at the right time.
- 🏠 Areas that know when they’re occupied (and when they’re clear)
- 💡 Lights that only turn on when (and where) they’re needed
- 🌡 Climate that adapts to your presence and routines
- 🌀 Fans that respond automatically to heat, humidity, or CO₂
- 🎶 Media and alerts routed only to occupied spaces
Smart areas that just works, everytime, out of the box. Fully customizable if you want it.
Download and install through HACS (Home Assistant Community Store):
- Detects presence in each area using multiple sources (motion sensors, media players, device trackers, BLE beacons, and more).
- Creates smart groups (lights, fans, climate, media players) that respond to an area’s state automatically.
- Supports secondary states like dark, sleep, and extended for context-aware automation.
- Provides meta-areas (e.g., Interior, Exterior, Global, Floors) to coordinate multiple areas at once.
- Includes built-in, automation-like features: light control, fan groups, climate preset switching, and more
Note
Check out our magic concepts on our documentation.
- 🕰️ Smart Presence Timeouts: Each area has a configurable timeout for clearing presence after the last motion. If motion is detected again within the timeout, it resets — no abrupt shutoffs.
- ✋ Presence Hold: Creates a switch to manually override presence in an area. Useful if sensors aren’t fully reliable yet or for guests.
- 🕯️ Secondary States: Define subtle room states for more nuanced automations:
dark/bright: Based on light sensors or sunsleep: Tracked by any entityextended: When a room has been occupied beyond a set timeaccented: Track presence based on entertainment like media players
- 🏠 Meta-Areas and Hierarchies: Set areas as interior, exterior and assign them to floors. Magic Areas will create meta-areas to track grouped presence (e.g., upstairs occupied). Presence logic and secondary states are inherited and calculated automatically.
- 💡 Smart Light Groups: Automatically groups your lights by purpose — overhead, task, accent, and sleep — and controls them based on presence state. Lights can be set to trigger only in the dark or after extended occupancy.
- 🌡️ Climate Control: Map area states to climate device presets. For example: set your HVAC to
ecowhen empty, and back tocomfortwhen occupied or in sleep mode. - 🧠 Wasp in a Box: Reliable presence sensing that accounts for people entering/leaving rooms with doors. Combines motion and door/garage sensors to prevent lights from turning off while you’re still inside.
- 🔥 Fan Groups: Auto-creates a
fangroup entity for each area and lets you control it using an aggregated value like temperature, humidity, or CO₂. Great for exhaust fans, ceiling fans, or air quality fans. - 📶 Area-Aware Media Player: Play media (like TTS alerts) only in rooms that are currently occupied. Forward notifications to the right areas — not empty ones.
- 🧮 Sensor Aggregates: Aggregates all
sensorandbinary_sensorentities in the area bydevice_classandunit_of_measurement. Great for dashboards, alerts, and logic. - 🚨 Health Sensor: Auto-aggregated binary sensors for safety-related device classes:
gas,smoke,moisture(leaks),problem,safety
- 📡 BLE Tracker Integration: Track text-based BLE sensors (like ESPresense, Bermuda, or Room Assistant) directly. Magic Areas will convert their values into usable presence sensors automatically.
Tip
Learn more about all features on our documentation.
Check out the Implementation Ideas documentation to see how you can apply Magic Areas to make every room in your house, magic!
Go to the documentation Quick Start for installation instruction.
📖 Visit the documentation for complete guides, examples, and tips.
Enjoy smarter automations — and areas that finally understand you're still in the room ✨
Visit the Troubleshooting documentation for instructions on getting help.
Magic Areas has full translation support, meaning even your entities will be translated and is available in the following languages:
Help to translate Magic Areas into your language from your web browser! We use Hosted Weblate so you don't need to fool around with pull requests nor JSON files!
Magic Areas is a passion project built and maintained with countless hours of development, testing, documentation, and supporting our amazing community. If you’ve found it useful and want to show some love, consider buying me a beer! 🍻
Your support helps keep the project alive and is hugely appreciated. ❤️

