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:
- Go to Settings > Automations & scenes.
- Open an existing automation, or select Create automation > Create new automation.
- In the When section, select Add trigger.
- From the search box, search for and select Geolocation.
- Under Source, enter the source of the integration that creates the entities, for example,
nsw_rural_fire_service_feed. - Under Zone, select the zone.
- Under Event, select Enter or Leave.
- Select Save.
Options in the UI
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:
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
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.
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
-
Source:
-
Condition: Template
- The incident type is
Bush Fire.
- The incident type is
-
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
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.
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.