mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Fix additional IQVIA data bug (#23931)
This commit is contained in:
parent
03a0a3572b
commit
1b5f526e09
@ -106,8 +106,8 @@ class ForecastSensor(IQVIAEntity):
|
|||||||
if not self._iqvia.data:
|
if not self._iqvia.data:
|
||||||
return
|
return
|
||||||
|
|
||||||
data = self._iqvia.data[self._type]['Location']
|
data = self._iqvia.data[self._type].get('Location')
|
||||||
if not data.get('periods'):
|
if not data or not data.get('periods'):
|
||||||
return
|
return
|
||||||
|
|
||||||
indices = [p['Index'] for p in data['periods']]
|
indices = [p['Index'] for p in data['periods']]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user