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.
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 |
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.
Since this project is not public yet, you need to add it as a custom repository in HACS.
- Open Home Assistant and navigate to HACS.
- Click on the three dots menu in the top right corner and select "Custom repositories".
- Add the repository URL:
https://github.com/psincraian/precios-tur-homeassistant
and select the category as "Integration". - Click "Add" and then search for "Precios TUR" in HACS and install it.
- Using the tool of choice open the directory (folder) for your HA configuration (where you find
configuration.yaml
). - If you do not have a
custom_components
directory (folder) there, you need to create it. - In the
custom_components
directory (folder) create a new folder calledprecios_tur
. - Download all the files from the
custom_components/precios_tur/
directory (folder) in this repository. - Place the files you downloaded in the new directory (folder) you created.
- Restart Home Assistant
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Precios TUR"
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).
If you want to contribute to this please read the Contribution guidelines