miflora - fix for exception handling bug (#12149)
* updated to development branch of miflora * updated requirements_all.txt * upgraded to version 0.3 * updated requirements_all.txt
This commit is contained in:
parent
2ae0c5653e
commit
2014e42e4e
2 changed files with 6 additions and 2 deletions
|
@ -16,7 +16,7 @@ from homeassistant.const import (
|
|||
)
|
||||
|
||||
|
||||
REQUIREMENTS = ['miflora==0.2.0']
|
||||
REQUIREMENTS = ['miflora==0.3.0']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -138,12 +138,16 @@ class MiFloraSensor(Entity):
|
|||
|
||||
This uses a rolling median over 3 values to filter out outliers.
|
||||
"""
|
||||
from miflora.backends import BluetoothBackendException
|
||||
try:
|
||||
_LOGGER.debug("Polling data for %s", self.name)
|
||||
data = self.poller.parameter_value(self.parameter)
|
||||
except IOError as ioerr:
|
||||
_LOGGER.info("Polling error %s", ioerr)
|
||||
return
|
||||
except BluetoothBackendException as bterror:
|
||||
_LOGGER.info("Polling error %s", bterror)
|
||||
return
|
||||
|
||||
if data is not None:
|
||||
_LOGGER.debug("%s = %s", self.name, data)
|
||||
|
|
|
@ -488,7 +488,7 @@ messagebird==1.2.0
|
|||
mficlient==0.3.0
|
||||
|
||||
# homeassistant.components.sensor.miflora
|
||||
miflora==0.2.0
|
||||
miflora==0.3.0
|
||||
|
||||
# homeassistant.components.upnp
|
||||
miniupnpc==2.0.2
|
||||
|
|
Loading…
Add table
Reference in a new issue