Geolocation

The Geolocation trigger reacts when an event from an integration that provides geolocation entities, such as a bush fire or an earthquake, enters or leaves a zone. This includes new events that appear in the zone and events that disappear from it. Use it for real-world events near your home, such as weather alerts, bush fires, or earthquakes.

For people and tracked devices, use the Zone entered or Zone left trigger instead.

To tell the trigger which entities to watch, you enter the source of the integration that creates them, for example, gdacs. For the source of each integration, refer to Integrations that provide geolocation entities.

Using this trigger from the user interface

If you prefer building automations visually, Home Assistant walks you through this trigger step by step. You pick what to watch, tweak a few options, and save. No YAML knowledge required.

To use this trigger in an automation:

  1. Go to Settings > Automations & scenes.
  2. Open an existing automation, or select Create automation > Create new automation.
  3. In the When section, select Add trigger.
  4. From the search box, search for and select Geolocation.
  5. Under Source, enter the source of the integration that creates the entities, for example, nsw_rural_fire_service_feed.
  6. Under Zone, select the zone.
  7. Under Event, select Enter or Leave.
  8. Select Save.

Options in the UI

Source (Required)

The source of the integration that creates the entities, for example, gdacs.

Zone (Required)

The zone to watch.

Event

When the trigger reacts:

  • Enter: when an event appears in the zone or moves into it. This is the default.
  • Leave: when an event disappears from the zone or moves out of it.

Using this trigger in YAML

If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.

In YAML, use trigger: geo_location. A basic example looks like this:

TriggerA trigger is the part of an automation that makes the automation start when something specific happens, for example, when the sun sets, a door opens, or a button is pressed. [Learn more]
trigger: geo_location
source: nsw_rural_fire_service_feed
zone: zone.bush_fire_alert_zone
event: enter

This reacts when a new incident of the NSW Rural Fire Service appears in the bush fire alert zone.

Options in YAML

trigger string Required

The trigger type. For this trigger, use geo_location.

source string Required

The source of the integration that creates the entities.

zone string Required

The entity ID of the zone to watch.

event string (Optional, default: enter)

enter reacts when an event appears in or moves into the zone. leave reacts when an event disappears from or moves out of the zone.

Good to know

  • Geolocation entities are temporary, so you can’t select a specific one in advance. This is why the trigger uses the source.
  • To react only to some events, add a Template condition that checks their attributes, for example, the type of incident. The bush fire example shows how.
  • For the data you can use in templates, refer to the geolocation trigger variables.

Try it yourself

Ready to test this? Go to Settings > Automations & scenes, create a new automation, and add this trigger. Save the automation, then change the state of the targeted entity to watch the trigger fire on your actual entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more].

More examples

Real scenarios where this trigger fires in automations and scripts. Copy any example and adapt it to your setup.

Tip

You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.

Automation: get a notification about a bush fire near your home

This example uses the NSW Rural Fire Service Incidents integration and a passive zone named Bush fire alert zone. When a bush fire is reported in the zone, a notification is shown in Home Assistant.

  • Trigger: Geolocation
    • Source: nsw_rural_fire_service_feed
    • Zone: Bush fire alert zone
    • Event: Enter
  • Condition: Template
    • The incident type is Bush Fire.
  • Action: Create persistent notification
    • Message: the incident name and status

Create the zone in Settings > Areas, labels & zones and turn on Passive.

YAML example for the integration and the zone
geo_location:
  - platform: nsw_rural_fire_service_feed
    latitude: -36.666667
    longitude: 149.833333
    radius: 15
    categories:
      - "Emergency Warning"
      - "Watch and Act"
      - "Advice"

zone:
  - name: Bush fire alert zone
    latitude: -36.666667
    longitude: 149.833333
    radius: 15000
    passive: true
YAML example for the automation
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Bush fire alert"
triggers:
  - trigger: geo_location
    source: nsw_rural_fire_service_feed
    zone: zone.bush_fire_alert_zone
    event: enter
conditions:
  - condition: template
    value_template: "{{ trigger.to_state.attributes.type == 'Bush Fire' }}"
actions:
  - action: persistent_notification.create
    data:
      title: "Bush fire alert"
      message: >
        {{ trigger.to_state.name }} - {{ trigger.to_state.attributes.status }}

Still stuck?

The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the trigger you’re using and what you expected to happen, or share on our subreddit /r/homeassistant.

Tip

AI assistants like ChatGPT or Claude can also explain triggers or suggest the right one when you describe what you want in plain language.

Related triggers

Explore related triggers:

  • Zone entered: Triggers when one or more people or device trackers enter a zone.

  • Zone left: Triggers when one or more people or device trackers leave a zone.