Skip to content

The Precios TUR integration for Home Assistant allows you to track the current gas prices from the Spanish TUR

License

Notifications You must be signed in to change notification settings

psincraian/precios-tur-homeassistant

Repository files navigation

Precios TUR

GitHub Release GitHub Activity License

Project Maintenance

Overview

The Precios TUR integration for Home Assistant allows you to track the current gas prices from the TUR (Tarifa de Último Recurso) service. This integration fetches data from the Precios TUR API and provides sensors to monitor different types of gas rates.

How It Works

This integration uses Precios TUR API to fetch the latest gas prices. It sets up sensors in Home Assistant to display the current variable rate, fixed rate, and total rate for the selected category (TUR1, TUR2, or TUR3). The data is updated periodically to ensure you always have the latest information.

This integration will set up the following platforms.

Platform Description
sensor Show info from TUR API

Sensors

The integration exposes the following sensors:

  • Variable Rate: Shows the current variable gas rate.
  • Fixed Rate: Shows the current fixed gas rate.

Each sensor is named according to the selected category (TUR1, TUR2, or TUR3) during the configuration.

Installation

Using HACS

Since this project is not public yet, you need to add it as a custom repository in HACS.

  1. Open Home Assistant and navigate to HACS.
  2. Click on the three dots menu in the top right corner and select "Custom repositories".
  3. Add the repository URL: https://github.com/psincraian/precios-tur-homeassistant and select the category as "Integration".
  4. Click "Add" and then search for "Precios TUR" in HACS and install it.

Manual

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called precios_tur.
  4. Download all the files from the custom_components/precios_tur/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Precios TUR"

Configuration

Configuration is done in the UI. When adding the integration, you will be prompted to enter the API URL and select the category (TUR1, TUR2, or TUR3).

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines


About

The Precios TUR integration for Home Assistant allows you to track the current gas prices from the Spanish TUR

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published