Skip to content
Snippets Groups Projects
Commit 111b482b authored by John Mihalic's avatar John Mihalic Committed by Pascal Vizeli
Browse files

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

parent 2a897574
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ from homeassistant.const import (CONF_API_KEY, CONF_NAME) ...@@ -14,7 +14,7 @@ from homeassistant.const import (CONF_API_KEY, CONF_NAME)
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['neurio==0.2.10'] REQUIREMENTS = ['neurio==0.3.1']
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
...@@ -66,7 +66,7 @@ class NeurioEnergy(Entity): ...@@ -66,7 +66,7 @@ class NeurioEnergy(Entity):
@property @property
def name(self): def name(self):
"""Return the name of th sensor.""" """Return the name of the sensor."""
return self._name return self._name
@property @property
...@@ -94,5 +94,5 @@ class NeurioEnergy(Entity): ...@@ -94,5 +94,5 @@ class NeurioEnergy(Entity):
sample = neurio_client.get_samples_live_last( sample = neurio_client.get_samples_live_last(
sensor_id=self.sensor_id) sensor_id=self.sensor_id)
self._state = sample['consumptionPower'] 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) _LOGGER.warning('Could not update status for %s', self.name)
...@@ -326,7 +326,7 @@ myusps==1.0.2 ...@@ -326,7 +326,7 @@ myusps==1.0.2
netdisco==0.8.1 netdisco==0.8.1
# homeassistant.components.sensor.neurio_energy # homeassistant.components.sensor.neurio_energy
neurio==0.2.10 neurio==0.3.1
# homeassistant.components.google # homeassistant.components.google
oauth2client==3.0.0 oauth2client==3.0.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment