Fix incorrect pyairvisual call (#21542)

pull/21712/head
Aaron Bach 2019-02-28 15:17:10 -07:00 committed by Paulus Schoutsen
parent 97b93bcf7b
commit 0f09c02875
1 changed files with 2 additions and 2 deletions

View File

@ -278,11 +278,11 @@ class AirVisualData:
try:
if self.city and self.state and self.country:
resp = await self._client.data.city(
resp = await self._client.api.city(
self.city, self.state, self.country)
self.longitude, self.latitude = resp['location']['coordinates']
else:
resp = await self._client.data.nearest_city(
resp = await self._client.api.nearest_city(
self.latitude, self.longitude)
_LOGGER.debug("New data retrieved: %s", resp)