Skip to content

Commit

Permalink
Merge pull request #34 from faanskit/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
faanskit authored Feb 11, 2024
2 parents 8571c9f + 4b61264 commit b8f613c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 190 deletions.
5 changes: 0 additions & 5 deletions examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
import argparse
import json

from dotenv import load_dotenv

from pycheckwatt import CheckwattManager

load_dotenv()


async def main(show_details=False):
"""Fetch username and password from environment variables."""
Expand All @@ -22,7 +18,6 @@ async def main(show_details=False):
if await check_watt_instance.login():
# Fetch customer detail
await check_watt_instance.get_customer_details()
await check_watt_instance.get_battery_peak_data()

# Do a sample
print("Customer Details\n================")
Expand Down
183 changes: 0 additions & 183 deletions examples/main.py

This file was deleted.

2 changes: 2 additions & 0 deletions pycheckwatt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def _get_headers(self):

def _extract_content_and_logbook(self, input_string):
"""Pull the registered information from the logbook."""
battery_registration = None

# Define the pattern to match the content between the tags
pattern = re.compile(
Expand Down Expand Up @@ -258,6 +259,7 @@ async def get_customer_details(self):
response.raise_for_status()
if response.status == 200:
self.customer_details = await response.json()
print(f"{json.dumps(self.customer_details, indent=4)}")

meters = self.customer_details.get("Meter", [])
if meters:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pycheckwatt"
version = "0.2.3"
version = "0.2.4"
description = "Read data from CheckWatts EnergyInBalance WEB API"
authors = ["Marcus Karlsson <[email protected]>", "Anders Yderborg <[email protected]>", "Daniel Nilsson <[email protected]>"]
license = "MIT License"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

MIN_PY_VERSION = "3.10"
PACKAGES = find_packages()
VERSION = "0.2.3"
VERSION = "0.2.4"

setup(
name="pycheckwatt",
Expand Down

0 comments on commit b8f613c

Please sign in to comment.