From 0f09c0287527005ecf72a7a50b15b2c0ff4b4559 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Thu, 28 Feb 2019 15:17:10 -0700 Subject: [PATCH] Fix incorrect pyairvisual call (#21542) --- homeassistant/components/sensor/airvisual.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/sensor/airvisual.py b/homeassistant/components/sensor/airvisual.py index e13fb924041..b9e7a3315e3 100644 --- a/homeassistant/components/sensor/airvisual.py +++ b/homeassistant/components/sensor/airvisual.py @@ -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)