Merge pull request #847 from molobrakos/patch-1

No need to call update() here
This commit is contained in:
Paulus Schoutsen 2016-01-05 08:55:48 -08:00
commit 99e14380fe

View File

@ -70,5 +70,8 @@ class EliqSensor(Entity):
def update(self):
""" Gets the latest data. """
response = self.api.get_data_now(channelid=self.channel_id)
self._state = int(response.power)
try:
response = self.api.get_data_now(channelid=self.channel_id)
self._state = int(response.power)
except TypeError: # raised by eliqonline library on any HTTP error
pass