Update neurio library req. & fix keyerror (#5565)

pull/5579/head
John Mihalic 2017-01-26 07:07:50 -05:00 committed by Pascal Vizeli
parent 2a897574a8
commit 111b482be4
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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