---
title: "Your phone checks you out while you're at home: presence by movement inside, not just by GPS"
description: "A template sensor in Home Assistant combines the phones and an mmWave presence sensor: someone is home if a phone is home or a person has been detected in the last 30 minutes."
canonical: "https://realhomeautomations.com/en/projects/phone-presence-by-movement-indoors/"
language: en-US
updated: 2026-11-23T16:24:03+00:00
---

# Your phone checks you out while you're at home: presence by movement inside, not just by GPS

A template sensor in Home Assistant combines the phones and an mmWave presence sensor: someone is home if a phone is home or a person has been detected in the last 30 minutes.

> Canonical HTML page: https://realhomeautomations.com/en/projects/phone-presence-by-movement-indoors/

- **Difficulty:** Intermediate
- **Build time:** 30–45 minutes
- **Reading time:** 3 minutes

## Tools required

- Home Assistant
- Presence sensor (Sonoff SNZB-06P, USB-C power)
- A Zigbee hub or adapter (or Home Assistant with a Zigbee adapter; not included in the product)
- A phone with the Companion app (for the person entity)


## What readers will learn

- Combine GPS and presence into one signal
- Avoid the lamps switching off while you are at home
- Know the sensor's limits


## Skill requirements

- Add a Zigbee device in Home Assistant
- Edit configuration.yaml

## Project kit

- [Sonoff SNZB-06P Zigbee Presence Sensor](https://realhomeautomations.com/en/product/sonoff-snzb-06p-zigbee-presence-sensor/index.md)

Your phone tells Home Assistant that you are "out" while you are on the sofa: GPS is lost, the battery is in power-saving mode or the phone is charging in another room. The lamps go off, the heating is lowered. Movement inside is a second source of truth.

 ## What you will get

 One shared signal "Someone is home", which is on if at least one phone is in the "home" zone **or** a presence sensor has detected a person in the last 30 minutes. Instead of reacting to GPS, the other automations use this signal.

 ## What we need

- [Sonoff SNZB-06P](https://realhomeautomations.com/bg/produkt/sonoff-snzb-06p-zigbee-presence-sensor/): one presence sensor in the room where you are most likely to be. For a second room you need a second sensor.
- Home Assistant with the Companion app on the phone, so that there is a `person` entity.

 You need a Zigbee hub or Home Assistant with a Zigbee adapter.

- **Setup time:** 30–45 minutes.
- **Skills:** you add a Zigbee device and paste YAML into `configuration.yaml`.
- **Mounting:** The SNZB-06P works on USB-C power, so it needs a nearby socket.

 ## How it works

 The SNZB-06P is an mmWave sensor: it also detects a person sitting still. According to the product description the range is up to 4 metres, the angle 150°. A PIR motion sensor sometimes "forgets" a person who does not move. The mmWave approach is better suited to presence.

 We combine the two sources with a template `binary_sensor`. The rule is: someone is home if **at least one** `person` is `home` or if the sensor is `on`. The delay `delay_off` keeps the signal on for 30 minutes after the last detection, so that it does not flicker with a short pause.

 ## Steps

- **Add the sensor.** Pair it through ZHA or Zigbee2MQTT. A presence `binary_sensor` appears (for example `binary_sensor.living_room_presence`).
- **Position the sensor.** Look over the room and avoid pointing it at a door, a curtain or a fan. The description recommends checking for motion through thin walls, moving curtains and fans before final mounting.
- **Create the template sensor.** In `configuration.yaml` add the block below, which is an example, and reload the templates (Developer tools → YAML → Template entities) or restart.

 ```
template:
  - binary_sensor:
      - name: "Someone home"
        unique_id: someone_home_presence
        device_class: occupancy
        delay_off:
          minutes: 30
        state: >
          {{ states.person | selectattr('state', 'eq', 'home') | list | count > 0
             or is_state('binary_sensor.living_room_presence', 'on') }}
```

 The entity's name becomes `binary_sensor.someone_home` or similar. Check it in Developer tools → States. The name is in English so that the entity ID is clear.

- **Use the new signal.** In your automations replace the check of `person` with this sensor. For example "turn off the lamps when nobody is home":

 ```
alias: "Lamps: turn off when nobody is home"
mode: single
triggers:
  - trigger: state
    entity_id: binary_sensor.someone_home
    to: "off"
actions:
  - action: light.turn_off
    target:
      area_id: living_room
```

 `light.turn_off` for the area `living_room` is an example: change it to your own.

 ## Checking the result

- **The phone is at home.** The signal is `on`.
- **The phone is lost, you are in the room.** Turn off the phone's location: the signal stays `on` because of the sensor.
- **Everyone leaves.** After the last movement and a 30-minute pause the signal becomes `off`.
- **The sensor has no connection.** Pull out the USB power: the signal follows only the phones.

 ## If it does not work

- **The signal does not go off.** A pet, a fan or a curtain is detected as presence. Move the sensor or reduce the range.
- **It does not light up while you sit.** The sensor points sideways or is too far away.
- **It flickers.** Increase `delay_off`.
- **There are no `person` entities.** Settings → People: add a person with a phone track.

 ## Limitations and switching off

- The sensor covers one room. If you are in another, the signal does not see you, so keep the phone as a second source too.
- Presence does not tell people from pets.
- If the sensor or Zigbee has stopped, only GPS remains.
- Switching off: return the automations to `person` and delete the template sensor.

 ## Sources and verification status

 The material follows the Home Assistant documentation, read on 22.11.2026. The topic is from Simeon's list of ideas.

- [Home Assistant: template binary sensors](https://www.home-assistant.io/integrations/template/), 22.11.2026
- [Home Assistant: Person](https://www.home-assistant.io/integrations/person/), 22.11.2026
- [Home Assistant: Zigbee Home Automation](https://www.home-assistant.io/integrations/zha/), 22.11.2026
- Real Home Automations catalogue: Sonoff SNZB-06P (product description), 22.11.2026