Usgs_earthquakes_feed does not notify automatically, only manually

Hi. The automation works only if an earthquake has actually occurred. When I see an earthquake point on a minimap, I run the automation manually and the alerts come. But it doesn’t work automatically. Thanks!

map:

type: map
title: Earthquakes
entities:
  - entity: zone.home
geo_location_sources:
  - usgs_earthquakes_feed
default_zoom: 5
theme_mode: auto

configuration.yaml:

geo_location:
  - platform: usgs_earthquakes_feed
    feed_type: "past_day_all_earthquakes"
    radius: 1000
    minimum_magnitude: 1.0
    latitude: SOMELATITUDE
    longitude: SOMELONGITUDE

automation:

alias: earthquake
trigger:
  - platform: geo_location
    source: usgs_earthquakes_feed
    zone: zone.home
    event: enter
condition: []
action:
  - variables:
      header: 🌎EARTHQUAKE
      time: >-
        {{ as_timestamp( states.geo_location | selectattr('attributes.source',
        'eq', 'usgs_earthquakes_feed') | map(attribute='attributes.time') | max
        ) | timestamp_custom('%Y-%m-%d %-H:%M') }}
      place: >-
        {{ states.geo_location | selectattr('attributes.source', 'eq',
        'usgs_earthquakes_feed') | map(attribute='attributes.place') | max }}
      magnitude: >-
        {{ states.geo_location | selectattr('attributes.source', 'eq',
        'usgs_earthquakes_feed') | map(attribute='attributes.magnitude') | max
        }}
      latitude: >-
        {{ states.geo_location | selectattr('attributes.source', 'eq',
        'usgs_earthquakes_feed') | map(attribute='attributes.latitude') | max }}
      longitude: >-
        {{ states.geo_location | selectattr('attributes.source', 'eq',
        'usgs_earthquakes_feed') | map(attribute='attributes.longitude') | max
        }}
  - data:
      title: "{{ header }}"
      message: |
        Time: {{ time }}
        Place: {{ place }}
        Magnitude: {{ magnitude }}
        On map: https://maps.yandex.ru/?text={{latitude}}%2C{{longitude}}
    action: persistent_notification.create
mode: single
1 Like

Likely you need to replace zone.home in your trigger with a larger zone. The event: enter only occurs if the quake location is inside the radius of the zone you specify.

image

Thanks for your reply. Radius is 1000 km. Only earthquakes that occur within this radius are shown. For example the last earthquake is 300km away from me, but the enter event didn’t happen for some reason.