Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.49 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.49 KB

PyPI Version pre-commit.ci Status Build Status

aiopvpc

Simple aio library to download Spanish electricity hourly prices.

Made to support the pvpc_hourly_pricing HomeAssistant integration.

Buy Me A Coffee donate button

Install

Install with pip install aiopvpc or clone it to run tests or anything else.

Usage

import aiohttp
from datetime import datetime
from aiopvpc import PVPCData

async 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"])