File: example.py

package info (click to toggle)
python-peblar 0.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 548 kB
  • sloc: python: 2,031; makefile: 3
file content (21 lines) | stat: -rw-r--r-- 512 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# pylint: disable=W0621
"""Asynchronous Python client for Peblar EV chargers."""

import asyncio

from peblar import Peblar


async def main() -> None:
    """Show example of programmatically control a Peblar charger."""
    async with Peblar(host="192.168.1.123") as peblar:
        await peblar.login(password="Sup3rS3cr3t!")

        await peblar.identify()

        system_information = await peblar.system_information()
        print(system_information)


if __name__ == "__main__":
    asyncio.run(main())