diff --git a/custom_components/solcast_solar/manifest.json b/custom_components/solcast_solar/manifest.json index e22e5c2c..e8f35931 100644 --- a/custom_components/solcast_solar/manifest.json +++ b/custom_components/solcast_solar/manifest.json @@ -10,5 +10,5 @@ "iot_class": "cloud_polling", "issue_tracker": "https://github.com/BJReplay/ha-solcast-solar/issues", "requirements": ["aiohttp>=3.8.5", "aiofiles>=23.2.0", "datetime>=4.3", "isodate>=0.6.1"], - "version": "4.2.2" + "version": "4.2.3" } diff --git a/custom_components/solcast_solar/solcastapi.py b/custom_components/solcast_solar/solcastapi.py index 3be381e3..12bcacd7 100644 --- a/custom_components/solcast_solar/solcastapi.py +++ b/custom_components/solcast_solar/solcastapi.py @@ -515,6 +515,8 @@ def redact_lat_lon(s) -> str: resp_json = json.loads(await f.read()) status = 200 for i in resp_json['sites']: + if i.get('api_key') is None: + continue if i.get('api_key') not in sp: status = 429 _LOGGER.debug("API key has changed so sites cache is invalid, not loading cached data")