Skip to content

Commit

Permalink
Use async version of get stockk in async update
Browse files Browse the repository at this point in the history
  • Loading branch information
claha committed May 16, 2020
1 parent 7c65a8e commit a7eb9c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/avanza_stock/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"documentation": "https://github.com/custom-components/sensor.avanza_stock",
"dependencies": [],
"codeowners": ["@claha"],
"requirements": ["pyavanza==0.2.1"]
"requirements": ["pyavanza==0.2.2"]
}
2 changes: 1 addition & 1 deletion custom_components/avanza_stock/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def unit_of_measurement(self):

async def async_update(self):
"""Update state and attributes."""
data = await pyavanza.get_stock(self._stock)
data = await pyavanza.get_stock_async(self._session, self._stock)
self.update_data(data)

def update_data(self, data):
Expand Down

0 comments on commit a7eb9c2

Please sign in to comment.