8000 GitHub - andrejs2/arso_potresi: ARSO potresi is a repository which contains a Home Assistant custom component integration for information about seismic events like earthquakes in Slovenia. Data provided by ARSO.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ARSO potresi is a repository which contains a Home Assistant custom component integration for information about seismic events like earthquakes in Slovenia. Data provided by ARSO.

License

Notifications You must be signed in to change notification settings

andrejs2/arso_potresi

Repository files navigation

ARSO Potresi - Home Assistant Custom Component

Python License Maintainer Home Assistant HACS GitHub Release

Made in Slovenia

BuyMeCoffee GitHub Sponsors

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

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.

Features

  • Real-Time Earthquake Data: Fetches the latest earthquake information from the ARSO Potresi API.
  • Sensor Entity: Displays key data such as local and UTC times, location, coordinates, depth, magnitude, EMS-98 intensity, and verification status.
  • Device Registry Support: The integration creates a device with proper device info and a unique ID.
  • Config Flow: Configurable via Home Assistant’s UI, with a single option to set the update interval (in minutes).

Installation

HACS Button:

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Manual Installation

  1. Place the integration folder in your Home Assistant custom_components directory:
    custom_components/arso_potresi/
    ├── __init__.py
    ├── const.py
    ├── config_flow.py
    └── sensor.py
    
    
  2. Restart Home Assistant.

Installation via HACS

If you use HACS, you can add this repository as a custom integration following the HACS documentation for custom integrations.

Configuration

This integration is configured via the UI using Home Assistant's Config Flow. No YAML configuration is required.

  1. Go to Settings > Devices & Services > Integrations.
  2. Click Add Integration and search for ARSO Potresi.
  3. In the configuration dialog, set the update interval (in minutes).
  4. 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.

How It Works

  • 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.
  • 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.

Device Information

< 6C77 p dir="auto">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

Troubleshooting

  • 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.

Contributing

Contributions are welcome!

License

This project is licensed under the MIT License.

About

ARSO potresi is a repository which contains a Home Assistant custom component integration for information about seismic events like earthquakes in Slovenia. Data provided by ARSO.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0