Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- name: Install prek
run: pip install prek==0.4.0
- name: Install dependencies
run: pip install -r requirements_lint.txt
- name: Run prek
run: prek run --all-files --skip no-commit-to-branch
build:
Expand Down
3 changes: 3 additions & 0 deletions EXTERNAL_SESSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The `python-openevse-http` library requires you to pass an external `aiohttp.Cli
import aiohttp
from openevsehttp import OpenEVSE


async def main():
timeout = aiohttp.ClientTimeout(total=30)
async with aiohttp.ClientSession(timeout=timeout) as session:
Expand All @@ -34,6 +35,7 @@ async def main():
import aiohttp
from openevsehttp import OpenEVSE


async def main():
async with aiohttp.ClientSession() as session:
charger1 = OpenEVSE("charger1.local", session=session)
Expand All @@ -52,6 +54,7 @@ Start websocket listening from the same event loop that owns the
import aiohttp
from openevsehttp import OpenEVSE


async def main():
async with aiohttp.ClientSession() as session:
charger = OpenEVSE("openevse.local", session=session)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import asyncio
import aiohttp
from openevsehttp import OpenEVSE


async def main():
async with aiohttp.ClientSession() as session:
charger = OpenEVSE("192.168.1.30", session=session)
Expand All @@ -48,6 +49,7 @@ async def main():
await charger.toggle_shaper()
await charger.ws_disconnect()


if __name__ == "__main__":
asyncio.run(main())
```
Expand Down
Loading