From 28e4f2ea46ab647891c12d0ecdb69b2d64925839 Mon Sep 17 00:00:00 2001 From: Kev Date: Sun, 10 Mar 2024 12:20:58 -0400 Subject: [PATCH] Change URLs to use the v2 Alpha Endpoint --- custom_components/pirateweather/config_flow.py | 2 +- custom_components/pirateweather/manifest.json | 2 +- custom_components/pirateweather/weather_update_coordinator.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/pirateweather/config_flow.py b/custom_components/pirateweather/config_flow.py index 2bc8c45..07fc32a 100644 --- a/custom_components/pirateweather/config_flow.py +++ b/custom_components/pirateweather/config_flow.py @@ -284,7 +284,7 @@ async def async_step_init(self, user_input=None): async def _is_pw_api_online(hass, api_key, lat, lon): forecastString = ( - "https://api.pirateweather.net/forecast/" + "http://piratev2lb-a90c79daaddc2625.elb.us-east-1.amazonaws.com:8000/forecastv2/" + api_key + "/" + str(lat) diff --git a/custom_components/pirateweather/manifest.json b/custom_components/pirateweather/manifest.json index 3c90e84..0ab7380 100644 --- a/custom_components/pirateweather/manifest.json +++ b/custom_components/pirateweather/manifest.json @@ -8,5 +8,5 @@ "iot_class": "cloud_polling", "issue_tracker": "https://github.com/alexander0042/pirate-weather-ha/issues", "requirements": ["python-forecastio==1.4.0"], - "version": "1.4.4" + "version": "1.4.4-v2-endpoint" } diff --git a/custom_components/pirateweather/weather_update_coordinator.py b/custom_components/pirateweather/weather_update_coordinator.py index 9e4de4f..5878fa2 100644 --- a/custom_components/pirateweather/weather_update_coordinator.py +++ b/custom_components/pirateweather/weather_update_coordinator.py @@ -59,7 +59,7 @@ async def _get_pw_weather(self): """Poll weather data from PW.""" forecastString = ( - "https://api.pirateweather.net/forecast/" + "http://piratev2lb-a90c79daaddc2625.elb.us-east-1.amazonaws.com:8000/forecastv2/" + self._api_key + "/" + str(self.latitude)