Changing location of json data to pull city name (#752)

This commit is contained in:
Curtis Adkins 2019-06-10 09:58:14 -04:00 committed by Erik Johnson
parent 991e32422f
commit 56ce08d0ff

View File

@ -252,7 +252,7 @@ class Weathercom(WeatherBackend):
# Again, same technique as above used to get down to the
# correct nested dict level.
self.city_name = self.city_name[next(iter(self.city_name))]
self.city_name = self.city_name['data']['prsntNm']
self.city_name = self.city_name['data']['location']['displayName']
except KeyError:
self.logger.warning(
'Failed to get city name from API response, falling back '