https://github.com/azogue/aiopvpc
Simple aio library to download Spanish electricity hourly prices (PVPC) from esios.ree.es
https://github.com/azogue/aiopvpc
electricity-prices home-assistant spain
Last synced: 5 months ago
JSON representation
Simple aio library to download Spanish electricity hourly prices (PVPC) from esios.ree.es
- Host: GitHub
- URL: https://github.com/azogue/aiopvpc
- Owner: azogue
- License: mit
- Created: 2020-03-16T18:31:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-05-05T19:07:57.000Z (6 months ago)
- Last Synced: 2025-05-05T20:28:57.689Z (6 months ago)
- Topics: electricity-prices, home-assistant, spain
- Language: Python
- Size: 1.51 MB
- Stars: 42
- Watchers: 10
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![PyPI Version][pypi-image]][pypi-url]
[![pre-commit.ci Status][pre-commit-ci-image]][pre-commit-ci-url]
[![Build Status][build-image]][build-url][pypi-image]: https://img.shields.io/pypi/v/aiopvpc
[pypi-url]: https://pypi.org/project/aiopvpc/
[pre-commit-ci-image]: https://results.pre-commit.ci/badge/github/azogue/aiopvpc/master.svg
[pre-commit-ci-url]: https://results.pre-commit.ci/latest/github/azogue/aiopvpc/master
[build-image]: https://github.com/azogue/aiopvpc/actions/workflows/main.yml/badge.svg
[build-url]: https://github.com/azogue/aiopvpc/actions/workflows/main.yml# aiopvpc
Simple aio library to download Spanish electricity hourly prices.
Made to support the [**`pvpc_hourly_pricing`** HomeAssistant integration](https://www.home-assistant.io/integrations/pvpc_hourly_pricing/).
## Install
Install with `pip install aiopvpc` or clone it to run tests or anything else.
## Usage
```python
import aiohttp
from datetime import datetime
from aiopvpc import PVPCDataasync with aiohttp.ClientSession() as session:
pvpc_handler = PVPCData(session=session, tariff="2.0TD")
esios_data = await pvpc_handler.async_update_all(
current_data=None, now=datetime.utcnow()
)
print(esios_data.sensors["PVPC"])
```