ARSO Potresi is a custom integration for Home Assistant that fetches earthquake data from the ARSO Potresi API and presents it as a sensor entity. The sensor displays the most recent earthquake's location (e.g., "6 km JV od Jelšan") as its state, while additional details are available as attributes.
Data provided by ARSO Potresi - Agencija RS za okolje. This integration is unofficial.
- Real-Time Data: Fetches the latest earthquake information directly from the ARSO Potresi API.
- Dual Sensors:
- Main Sensor (
sensor.arso_potresi
): Displays key data such as local and UTC times, location, coordinates, depth, magnitude, EMS-98 intensity, and verification status. - Map Sensor (
sensor.zadnji_potres_magnituda
): Enables easy visualization of the latest earthquake on the Home Assistant map, with the magnitude displayed inside the marker.
- Main Sensor (
- Structured History: A detailed history of past earthquakes is available as structured attributes on the main sensor.
- Fully Configurable via UI: The integration can be fully configured through the Home Assistant UI, including the update interval and the number of days for historical data.
- Place the integration folder in your Home Assistant
custom_components
directory:custom_components/arso_potresi/ ├── __init__.py ├── const.py ├── config_flow.py └── sensor.py
- Restart Home Assistant.
If you use HACS, you can add this repository as a custom integration following the HACS documentation for custom integrations.
This integration is configured via the UI using Home Assistant's Config Flow. No YAML configuration is required.
- Go to Settings > Devices & Services > Integrations.
- Click Add Integration and search for ARSO Potresi.
- In the configuration dialog, set the Update interval (in minutes) and the History days (e.g., 7 days).
- Complete the setup. The integration will create a sensor entity named
sensor.arso_potresi
that displays the most recent earthquake’s location as its state and includes all details as attributes.
You can change the settings at any time without having to delete and re-add the integration. Simply navigate to Settings > Devices & Services > Integrations, find the ARSO Potresi integration, and click the Configure button to edit the options.
To display the latest earthquake on a map, use the standard map
card with the following configuration:
type: map
entities:
- entity: sensor.zadnji_potres_magnituda
label_mode: state
- Data Fetching: The sensor fetches data from the ARSO Potresi API. It assumes that the first element in the returned JSON is the latest earthquake event.
- Earthquake History: The integration now stores a list of earthquakes in the attribute
Zgodovina potresov
. This list includes all earthquakes that occurred within the selected time period (configured byhistory_days
). This allows you to display historical data in a Lovelace card. - Data Formatting: - Local Time: Formatted from the API's
TIME
field (e.g., "20. 2. 2025 ob 23.11").- UTC Time: Derived from the
TIME_ORIG
field. - Coordinates: Latitude and longitude values are formatted with a comma as the decimal separator.
- Additional Attributes: Depth (with "km" appended), magnitude (formatted with one decimal and a comma), EMS-98 intensity (displayed as "-" if null), and verification status based on the
REVISION
field.
- UTC Time: Derived from the
The sensor registers as a device in Home Assistant with the following information:
- Identifiers:
(arso_potresi, arso_potresi_sensor)
- Name: ARSO Potresi
- Manufacturer: ARSO
- Model: Potresi
-
Integration Not Showing Up:
-
Ensure that the integration is placed in the correct directory:
custom_components/arso_potresi/
-
Check your Home Assistant logs for errors.
-
Restart Home Assistant after installation.
-
Data Issues:
-
Check the logs for any error messages during data fetch.
Contributions are welcome!
This project is licensed under the MIT License.