About meContact

Home Assistant knows when you come home: presence automations

One of the most useful smart home features is the ability to react without a button press or voice command.

Home Assistant can know whether residents are at home, leaving or returning. The home can then adjust heating and ventilation, prepare suitable lighting, perform alarm-related actions or turn off unnecessary devices after the last person leaves.

The logic must be designed carefully. A simple home or not_home state is not always enough for a safe whole-home automation.

How can Home Assistant know that you are home?

A common source is the Home Assistant Companion app, which can report location and zones from a phone.

A system may also use network connection trackers, Bluetooth or additional sensors. A Person entity can combine several trackers assigned to the same person, but the data source must be reliable enough for the action it controls.

There is no single best method for every home.

The home zone

Home Assistant can define geographic areas. The home zone is usually the most important. Entering it may indicate an arrival and leaving it may indicate a departure.

Zones can also represent work, school or another useful place. A zone state can show how many assigned people are currently inside it.

Location data should support a real automation, not be collected without a purpose.

The home can prepare before you enter

The response does not have to stop at switching on a light after the door opens. Depending on the available devices, Home Assistant can:

  • restore the appropriate heating mode;
  • change ventilation mode;
  • prepare lighting for the time of day;
  • start selected devices or prepare media;
  • perform other installation-specific actions.

Not every action should run immediately when a phone enters a large zone. The logic must reflect the nature of the action and possible location delays.

What can happen after leaving home?

After the last resident leaves, the system can:

  • turn off unnecessary lighting;
  • change heating or ventilation mode;
  • switch off selected devices;
  • check the home and prepare the alarm system;
  • notify you about an open window or door.

The words last resident matter. One person leaving must not switch the whole building to away mode while somebody else remains inside.

The first person returns, the last person leaves

In a multi-person home, two events are especially useful: the first person returning to an empty home and the last person leaving.

Home Assistant can then control a building mode instead of running the same sequence for every phone. The general mechanism is explained in Home Assistant automations.

Presence and the alarm system

Presence may be part of alarm logic. When the last person leaves, the system can prepare arming. After a correctly recognised arrival, it can perform actions allowed by the particular alarm integration.

Do not treat the phone as an unconditional disarming key. A device appearing inside a zone should not always be the only condition for a security-critical operation.

A phone should not be the only signal in critical scenarios

GPS and phone location may update late or with limited accuracy. Important actions can combine phone location, network presence, a door opening, person detection, alarm state and the presence of other residents.

Not every home needs every signal. Complexity should match the consequences of a false reaction.

Delays prevent accidental reactions

A phone near a zone boundary may briefly change state. Reacting instantly to each update can cause unnecessary actions.

Depending on the scenario, use a confirmation period, delay or another condition. An entrance light needs different safeguards from an alarm or heating system.

Presence and heating

An empty home may use a more economical heating mode. Before an expected return, or after the first person arrives, it can restore comfort settings.

Heating should not simply be switched off without considering temperature, building inertia, weather and heat-source type. See Home Assistant heating and energy costs for the wider context.

Presence and heat recovery ventilation

An empty building can use a different ventilation mode from a home occupied by several people. Normal airflow can return when somebody arrives, while humidity or CO2 sensors continue to adjust demand.

This does not mean disabling required ventilation. Read more in Heat recovery ventilation in Home Assistant.

Lighting based on conditions

Returning home does not need to switch on the same lights every time. Home Assistant can consider time, illuminance, sunset, other residents and the current lighting state.

It may do nothing in daylight, turn on a gentle entrance light in the evening and use a different scene at night.

Media after returning home

Presence can be one condition for preparing devices or a media scene. It does not need to start music every time the door opens.

Better logic can consider the specific person, time of day and an additional user action.

Guests and people without the app

A home must not be considered empty only because every tracked phone has left. Guests, children or people without tracked devices may still be inside.

A guest mode, manual away-mode lock or additional presence data can prevent the wrong decision.

Presence detection and privacy

Users should know what location information their phones send to Home Assistant and why. Not every automation needs exact coordinates or location history.

The Companion app can send exact location, a zone name only, or no location. For many automations, entering and leaving a zone is sufficient.

A good presence automation does not do everything at once

Start with a few actions that provide a real benefit:

  • the first person returns and the home enters occupied mode;
  • the last person leaves and unnecessary devices switch off;
  • an evening arrival activates suitable lighting;
  • the system warns about an open window;
  • heating and ventilation use the correct mode.

Add further dependencies only after the first behaviours have been tested.

Where should you start?

First decide:

  • which people need to be detected;
  • which presence sources are available;
  • which actions affect convenience and which affect security;
  • what happens when the first person returns;
  • what happens when the last person leaves;
  • how guests are handled;
  • which reactions require extra confirmation.

Build the automation only after these decisions are clear.

Would you like your home to prepare for your return?

If you like the idea of a home that recognises residents arriving and leaving, I can design the logic for your installation. Presence can work with lighting, heating, ventilation, alarms, media and devices already connected to Home Assistant.

You do not need to choose every sensor, condition and safeguard yourself. I can review the current configuration and tailor the reactions to how you actually use your home.

Let us design a safer arrival home.The initial assessment of your installation is free and without obligation. → click here

Documentation

Home Assistant Person
Combining trackers and determining a person's state

Home Assistant Zone
Zones, occupancy, entering and leaving

Home Assistant Companion
Phone location, zones and privacy settings

Home Assistant Device tracker
Position and connection trackers

Home Assistant Alarm control panel
General alarm control model