Skip to content

Commit

Permalink
Merge pull request #15 from KrzysztofHajdamowicz/add-battery
Browse files Browse the repository at this point in the history
New feature: query current battery state
  • Loading branch information
andrewgierens authored Mar 26, 2024
2 parents 06207de + 998923c commit 3b98845
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions tessie_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .battery_health import get_battery_health
from .battery import get_battery
from .boombox import boombox
from .charges import get_charges
from .charges import set_charge_cost
Expand Down
14 changes: 14 additions & 0 deletions tessie_api/battery.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import aiohttp
from typing import Any, Dict

from .tessie_wrapper import tessieRequest


async def get_battery(
session: aiohttp.ClientSession,
vin: str,
api_key: str,
) -> Dict[str, Any]:
return await tessieRequest(
session, "GET", f"/{vin}/battery", api_key
)

0 comments on commit 3b98845

Please sign in to comment.