Python interface to the Combined Energy API
Reason this release was yanked:
Compatibility issue with pydantic>2 and Home assistant
Project description
Python: Asynchronous client for Combined Energy API
Provides an async Python 3.8+ interface for the http://combined.energy/ monitoring platform API.
Note this API client is reverse engineered from observing requests being made
in the web-application. Please report any failures to read data, this is likely to occur for readings as I am only able to create entries for devices that I have.
Installation
Install from PyPI
python3 -m pip install combined-energy-api
Usage
import asyncio
from combined_energy import CombinedEnergy
from combined_energy.helpers import ReadingsIterator
async def main():
"""
Example using Combined Energy API client.
"""
async with CombinedEnergy(
mobile_or_email="user@example.com",
password="YOUR_COMBINED_ENERGY_PASSWORD",
installation_id=9999,
) as combined_energy:
status = await combined_energy.communication_status()
print(status)
# To generate a stream of readings use the iterator, this example fetches
# data in 5 minute increments
async for readings in ReadingsIterator(combined_energy, increment=300):
print(readings)
await asyncio.sleep(300)
asyncio.run(main())
Development Environment
You will need:
- Python 3.8+
- poetry
- pre-commit
Ensure pre-commit is installed into your git repository with pre-commit install
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
combined_energy_api-0.6.1.tar.gz
(18.7 kB
view hashes)
Built Distribution
Close
Hashes for combined_energy_api-0.6.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05e7f91c4007fada5f1a50651d300880ef6c8408843656c72bc98691038d13a2 |
|
MD5 | d26f61d8376c84e8c4605ae54433377b |
|
BLAKE2b-256 | 6af3a54ab315b6924ec8467c0cf057b8b1a107a75abfae74bbef1ec064273cdd |
Close
Hashes for combined_energy_api-0.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edd6d19073609d590d2c034a6ec336c55592040c5974d7ee3b94baa4f9ebfc45 |
|
MD5 | 2d06794e0e9ed84e08075ce59450919d |
|
BLAKE2b-256 | b4e4b857463dcaa96f4c12f7111427751c4ba7be84c18f50c948bd9031f45442 |