Tibber, combine two fetches into one fetch (#40787)

pull/40794/head
Daniel Hjelseth Høyer 2020-09-30 17:17:21 +02:00 committed by GitHub
parent 01a0ffa636
commit 4c157f65ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -157,8 +157,7 @@ class TibberSensorElPrice(TibberSensor):
@Throttle(MIN_TIME_BETWEEN_UPDATES)
async def _fetch_data(self):
try:
await self._tibber_home.update_info()
await self._tibber_home.update_price_info()
await self._tibber_home.update_info_and_price_info()
except (asyncio.TimeoutError, aiohttp.ClientError):
return
data = self._tibber_home.info["viewer"]["home"]