diff --git a/pycheckwatt/__init__.py b/pycheckwatt/__init__.py index dcce5dd..c508e05 100644 --- a/pycheckwatt/__init__.py +++ b/pycheckwatt/__init__.py @@ -152,10 +152,11 @@ def _extract_fcr_d_state(self): if fcrd_percentage is not None: self.fcrd_info = fcrd_percentage elif error_info is not None: - self.fcrd_info = error_info + error_info = error_info.split("]", 1)[0].strip() + self.fcrd_info = error_info.strip("[]").strip() else: self.fcrd_info = None - break # stop so we get the first row in logbook + break # stop so we get the first row in logbook async def handle_client_error(self, endpoint, headers, error): """Handle ClientError and log relevant information.""" @@ -259,7 +260,6 @@ 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: diff --git a/pyproject.toml b/pyproject.toml index 1029d5c..e0afd88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pycheckwatt" -version = "0.2.4" +version = "0.2.5" description = "Read data from CheckWatts EnergyInBalance WEB API" authors = ["Marcus Karlsson ", "Anders Yderborg ", "Daniel Nilsson "] license = "MIT License" diff --git a/setup.py b/setup.py index b02b7ab..f7a956b 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ MIN_PY_VERSION = "3.10" PACKAGES = find_packages() -VERSION = "0.2.4" +VERSION = "0.2.5" setup( name="pycheckwatt",