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
Branches
Tags
No related merge requests found
......@@ -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)
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment