-
Notifications
You must be signed in to change notification settings - Fork 29
Presence Sensing
Magic Areas works by triggering Events whenever it senses a change in the presence withing a given area. Different platforms are used to sense presence (see below) in different ways but all boils down to the states given out by those platforms.
Currently, Magic Areas supports the following Home Assistant platforms:
- Media Player
- Binary Sensor
- Device Tracker
This might seem like a limited set but this is due Magic Areas relying on those platforms straightforward states and device_class
in order to figure out automatically which entities can be used for presence sensing.
For example, it assumes:
- If a Media Player entity is playing in a given area, that this area must be occupied.
- If a device tracked by a
device_tracker
(say, a desktop computer) ishome
, then that area must be occupied. - If some Binary Sensors (see below for the default and supported device classes) are on
on
state, then ... you catch the drift!
on
home
playing
presence
motion
occupancy
Those device classes can be configured on the UI to support additional ones to fit your need. For example you might want to have door
device class to indicate presence, as I do for my kitchen-to-garage door.
We cannot reliably decide if a switch
entity or other sensors can be used for presence sensing but nothing stops you from using Template Binary Sensors or Switch as X.
Here's a few ideas:
- Using power consumption of a
power
sensor within a threshold (I use this for TV, workstation monitors, treadmill and others) with a Template Binary Sensor - Using the state of a
switch
- Pairing with Room Assistant sensor depending on which room it has on its state
📚 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