Documentation website: https://hidiho01.github.io/python-frank-energie/
Asyncio package to communicate with Frank Energie. This package is created to be used with https://github.com/HiDiHo01/home-assistant-frank_energie. The python-frank-energie repository is a well-structured, modern Python library. It effectively leverages asynchronous programming, dataclasses for robust data modeling, and Poetry for packaging. The extensive test suite with mocked GraphQL responses and the automated CI/CD pipeline demonstrate a high standard of software engineering, making it a reliable foundation for the Home Assistant integration it serves.
This package is not developed, nor supported by Frank Energie.
python3 -m pip install python-frank-energie
For the site-level Smart HVAC feature status and distinct device-oriented API methods, see Smart HVAC API. Smart PV inventory and status.
This repo uses Python Poetry to easily run CI/CD scripts using a local environment. In combination with pre-commet you can make sure the PR passes the checks the first time.
- Clone and enter this repo
- Install poetry using
pip install poetry - Install the environment using
poetry install
When making a commit, pre-commit runs to check, format and test the code. If everything passes you can push the changes via a Pull request. There GitHub Actions will check if you did everything right and it will notify me. Feel free to ask me to review your PR.
Use Ruff for Python source formatting and linting (Python 3.12+):
poetry run ruff format . poetry run ruff format --check . poetry run ruff check .
The separate blacken-docs hook is retained for Python examples in documentation.
Some nice or useful commands:
poetry shell-> Run commands likepytest testwith the correct environment, no need to prefix commands withpoetry run ...(poetry run) pytest tests-> Runs the unit tests(poetry run) pre-commit run --all-files-> Run all pre-commit steps on all files.git commit -n ...-> The-nflag allows you to ignore the pre-commit result and make a commit, useful when you want to commit drafts. All commits form a PR will be squashed so you can do this any time.