diff --git a/CHANGELOG.md b/CHANGELOG.md index 42249dd..4116c16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## [1.2.0] - 2022-07-12 +## [1.2.0] - 2022-08-05 ### NEW * Firmware version displayed on device details page. diff --git a/src/airthings.py b/src/airthings.py index 809b247..24c03c1 100644 --- a/src/airthings.py +++ b/src/airthings.py @@ -270,7 +270,7 @@ async def get_info(self): _LOGGER.warning("Error getting {}".format(characteristic.name)) self.devices[mac] = device else: - raise "Could not connect to {}".format(mac) + raise Exception("Could not connect to {}".format(mac)) except Exception as e: _LOGGER.exception("Error getting device info for {}: {}".format(mac, e)) finally: @@ -294,11 +294,11 @@ async def get_sensors(self): sensor_characteristics.append(characteristic) self.sensors[mac] = sensor_characteristics else: - raise "Could not connect to {}".format(mac) + raise Exception("Could not connect to {}".format(mac)) except Exception as e: _LOGGER.exception("Error getting sensors for {}: {}".format(mac, e)) finally: - await self.disconnect() + await self.disconnect() return self.sensors @@ -342,7 +342,7 @@ async def get_sensor_data(self): else: self.sensordata[mac].update(sensor_data) else: - raise "Could not connect to {}".format(mac) + raise Exception("Could not connect to {}".format(mac)) except Exception as e: _LOGGER.exception("Error getting sensor data for '{}': {}".format(mac, e))