From 111b482be49a81a51a66693fc337dbf1ccd00ca0 Mon Sep 17 00:00:00 2001 From: John Mihalic Date: Thu, 26 Jan 2017 07:07:50 -0500 Subject: [PATCH] Update neurio library req. & fix keyerror (#5565) --- homeassistant/components/sensor/neurio_energy.py | 6 +++--- requirements_all.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/sensor/neurio_energy.py b/homeassistant/components/sensor/neurio_energy.py index 2315615ca54..1ef328af8f4 100644 --- a/homeassistant/components/sensor/neurio_energy.py +++ b/homeassistant/components/sensor/neurio_energy.py @@ -14,7 +14,7 @@ from homeassistant.const import (CONF_API_KEY, CONF_NAME) from homeassistant.helpers.entity import Entity import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['neurio==0.2.10'] +REQUIREMENTS = ['neurio==0.3.1'] _LOGGER = logging.getLogger(__name__) @@ -66,7 +66,7 @@ class NeurioEnergy(Entity): @property def name(self): - """Return the name of th sensor.""" + """Return the name of the sensor.""" return self._name @property @@ -94,5 +94,5 @@ class NeurioEnergy(Entity): sample = neurio_client.get_samples_live_last( sensor_id=self.sensor_id) self._state = sample['consumptionPower'] - except (requests.exceptions.RequestException, ValueError): + except (requests.exceptions.RequestException, ValueError, KeyError): _LOGGER.warning('Could not update status for %s', self.name) diff --git a/requirements_all.txt b/requirements_all.txt index b086258b9fd..3f1372ffcce 100755 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -326,7 +326,7 @@ myusps==1.0.2 netdisco==0.8.1 # homeassistant.components.sensor.neurio_energy -neurio==0.2.10 +neurio==0.3.1 # homeassistant.components.google oauth2client==3.0.0