π Presence Sensing¶
Magic Areas works by detecting presence within an area and triggering state changes or automations accordingly. It does this by monitoring presence-related events from specific Home Assistant entity types and interpreting their states to determine whether an area is occupied or clear.
π°οΈ Supported Presence Sources¶
Magic Areas currently supports presence sensing from the following Home Assistant platforms:
media_player
(andremote
)binary_sensor
device_tracker
This may seem like a limited list, but it's intentional. Magic Areas relies on clear and predictable states
and device_class
values to automatically detect which entities can be used for presence sensing β with no manual configuration required in most cases.
Presence logic examples:¶
- If a
media_player
is playing in an area β the area is considered occupied. - If a
device_tracker
entity (e.g., your desktop computer) is home β the area is occupied. - If a
binary_sensor
for motion or presence is on β the area is occupied.
π§ Default Presence States¶
The following entity states are used by default to infer presence:
on
home
playing
π‘ Default binary_sensor
Device Classes¶
Magic Areas automatically uses the following device_class
values for binary_sensor
entities:
motion
occupancy
presence
These cover most sensors used for room occupancy detection.
You can also extend this list in the UI if you use other sensors that make sense for your setup β for example, using a door
sensor on a frequently used door like your garage entry.
β οΈ Known Limitations¶
Some Home Assistant entities β such as switch
or general-purpose sensor
β donβt reliably convey presence information by default. However, you can easily work around this using Home Assistantβs flexible templating tools.
π‘ Tips for Custom Presence Detection¶
You can create custom presence logic using these tools:
-
Template Binary Sensors Use them to turn power or status sensors into binary
on
/off
presence indicators. -
Switch as X Useful for converting smart plugs into presence sensors by modeling them as something else.
β Example Use Cases:¶
- Detect TV usage by monitoring power draw with a smart plug, then create a template binary sensor to represent presence.
- Use a door contact sensor (
device_class: door
) to indicate occupancy when a specific door opens. - Combine with external solutions like Bermuda, ESPresence and Room Assistant to use Bluetooth-based room tracking.
With the right combination of sensors and logic, Magic Areas can reliably detect presence in every corner of your home β even in edge cases!