Proximity question

Hello,
I want to shut down the water heater if my wife and me are more than 100 km away from home (and other conditions).
I have the home zone that as a radius of 100 meters and the home_proximity zone that as a radius of 100 km.

I can use the proximity integration to detetect if we are in the zone or not.

But… I don’t understand how to use and what is the configuration.yaml part and the automation part.

Can you show me an example ?

Many thanks and best regards

Thierry

There is an example in the documentation.

automation:
  trigger:
    platform: zone
    entity_id: device_tracker.paulus
    zone: zone.home
    # Event is either enter or leave
    event: enter # or "leave"
1 Like

You don’t need the second zone - the 100 km one - if you’re using the proximity integration.

That will generate you entities like proximity.capt_nemo:

proximity:
  capt_nemo:
    zone: home
    devices:
      - device_tracker.capt_nemo
    tolerance: 50
    unit_of_measurement: km

Now you can use that in a numeric state trigger:

automation:
  trigger:
    - platform: numeric_state
      entity_id: proximity.capt_nemo
      below: 100
3 Likes