Proximity

The proximity integration allows you to monitor the proximity of devices or persons to a particular zone and the direction of travel.

This integration is useful to reduce the number of automation rules required when wanting to perform automations based on locations outside a particular zone. The zone and state based triggers allow similar control but the number of rules grows exponentially when factors such as direction of travel need to be taken into account.

Some examples of its use include:

  • Increase thermostat temperature as you near home
  • Decrease temperature the further away from home you travel

Configuration

To add the Proximity integration to your Home Assistant instance, use this My button:

Manual configuration steps

If the above My button doesn’t work, you can also perform the following steps manually:

  • Browse to your Home Assistant instance.

  • Go to Settings > Devices & Services.

  • In the bottom right corner, select the Add Integration button.

  • From the list, select Proximity.

  • Follow the instructions on screen to complete the setup.

Note

When adding the Proximity integration, you are prompted to define the Tolerance distance. The tolerance distance must be provided in meters (m) and is used to filter out small GPS coordinate changes (due to inaccuracies of GPS) to calculate the direction of travel.

Sensors

The following sensor entities will be created.

Distance

For each tracked device or person, a sensor is created showing the distance from the monitored zone in a unit depending on your Home Assistant Unit System selection. When a tracked person or device enters the monitored zone, the distance is set to 0.

Direction of travel

For each tracked device or person, a sensor is created showing the direction of travel to or from the monitored zone. Possible states are:

  • arrived
  • away_from
  • stationary
  • towards
  • unknown

Important

To calculate the distance and the direction of travel for a tracked device or person, they must specify a geo-location.

Nearest device

A sensor is created showing the device or person which is nearest (shortest distance) to the monitored zone. If several devices or persons are at the same nearest distance, this sensor displays them all.

Nearest distance

This sensor shows the distance of the device or person nearest to the monitored zone. The unit depends on your settings for the Home Assistant unit system. When a tracked person or device enters the monitored zone, the distance is set to 0.

Nearest Direction of travel

This sensor shows the direction of travel of the nearest device or person to the monitored zone. Possible states are:

  • arrived
  • away_from
  • stationary
  • towards
  • unknown

Video tutorial

This comprehensive video tutorial explains how to utilize the Proximity integration to automatically adjust the heating in your home based on your presence, whether you’re leaving or entering an area around your house.