From 978bc77e7c408d1f3152b633e6e0d54a6eb7be06 Mon Sep 17 00:00:00 2001 From: FluffyKraken Date: Sun, 10 Mar 2019 13:53:03 +0100 Subject: [PATCH] fixing issue #3 --- bvgsensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bvgsensor.py b/bvgsensor.py index 37db4f9..2f1d2f5 100644 --- a/bvgsensor.py +++ b/bvgsensor.py @@ -164,7 +164,7 @@ def update(self): def fetchDataFromURL(self): try: with urlopen(self.url) as response: - source = response.read() + source = response.read().decode('utf8') self.data = json.loads(source) if self._con_state.get(CONNECTION_STATE) is CON_STATE_OFFLINE: _LOGGER.warning("Connection to BVG API re-established")