From 32ea49f2e460d44727f2929e64c6262bbe010d4b Mon Sep 17 00:00:00 2001 From: LeighCurran Date: Sat, 6 Nov 2021 21:52:44 +1100 Subject: [PATCH] Bugfix --- custom_components/auroraplus/manifest.json | 2 +- custom_components/auroraplus/sensor.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/custom_components/auroraplus/manifest.json b/custom_components/auroraplus/manifest.json index 41983f1..3b6d1d5 100644 --- a/custom_components/auroraplus/manifest.json +++ b/custom_components/auroraplus/manifest.json @@ -8,5 +8,5 @@ "requirements": ["AuroraPlus==1.1.6"], "iot_class": "cloud_polling", "config_flow": false, - "version": "1.1.6" + "version": "1.1.7" } diff --git a/custom_components/auroraplus/sensor.py b/custom_components/auroraplus/sensor.py index 9c7ed84..79dd7df 100644 --- a/custom_components/auroraplus/sensor.py +++ b/custom_components/auroraplus/sensor.py @@ -50,8 +50,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None): name = config.get(CONF_NAME) try: - AuroraPlus = auroraplus.api() - AuroraPlus.auth(username, password) + AuroraPlus = auroraplus.api(username, password) _LOGGER.debug("Error: %s", AuroraPlus.Error) except OSError as err: _LOGGER.error("Connection to Aurora+ failed: %s", err) @@ -124,7 +123,6 @@ def update(self): if self._sensor == SENSOR_KILOWATTHOURUSAGE or self._sensor == SENSOR_DOLLARVALUEUSAGE: self._session.getsummary() self._data = self._session - self._data = self._session.close() except OSError as err: _LOGGER.error("Updating Aurora+ failed: %s", err)