Merge pull request #847 from molobrakos/patch-1
No need to call update() here
This commit is contained in:
commit
99e14380fe
1 file changed
+5
-2
@@ -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
|
||||
Reference in new issue
Block a user