diff --git a/README.md b/README.md index 6e45a91..76566bb 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,6 @@ There is also data available which is updated every hour by DWD. Be careful thou - PRECIPITATION_PROBABILITY - PRECIPITATION_DURATION -These values will be replaced by the 6 hour forecast. - You can use this data by using the optional parameter `force_hourly=True`. ```python diff --git a/setup.py b/setup.py index 5da9abc..39ad578 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="simple_dwd_weatherforecast", - version="2.0.17", + version="2.0.18", author="Max Fermor", description="A simple tool to retrieve a weather forecast from DWD OpenData", long_description=long_description, diff --git a/simple_dwd_weatherforecast/dwdforecast.py b/simple_dwd_weatherforecast/dwdforecast.py index c200c9f..b67508f 100644 --- a/simple_dwd_weatherforecast/dwdforecast.py +++ b/simple_dwd_weatherforecast/dwdforecast.py @@ -542,20 +542,7 @@ def update( or (datetime.now(timezone.utc) - self.issue_time >= timedelta(hours=6)) or force_hourly ): - if force_hourly: - self.download_latest_kml(self.station_id) - temp_forecast_data = self.forecast_data self.download_latest_kml(self.station_id, force_hourly) - if force_hourly: - for item in self.forecast_data: - if "wwP" in temp_forecast_data[item]: - self.forecast_data[item]["wwP"] = temp_forecast_data[item][ - "wwP" - ] - if "DRR1" in temp_forecast_data[item]: - self.forecast_data[item]["DRR1"] = temp_forecast_data[item][ - "DRR1" - ] def get_weather_type(self, kmlTree, weatherDataType: WeatherDataType): """Parses the kml-File to the requested value and returns the items as array""" diff --git a/tests/test_update_hourly.py b/tests/test_update_hourly.py index 8948f41..6890359 100644 --- a/tests/test_update_hourly.py +++ b/tests/test_update_hourly.py @@ -48,17 +48,3 @@ def test_issue_time_actual(self, mock_function, _): self.dwd_weather.issue_time = datetime.now(timezone.utc) self.dwd_weather.update() mock_function.assert_not_called() - - def test_replace_of_prec_probability_duration(self): - timestamp = datetime.now(timezone.utc) + timedelta(hours=1) - self.dwd_weather.update(force_hourly=True) - self.assertIsNotNone( - self.dwd_weather.get_forecast_data( - dwdforecast.WeatherDataType.PRECIPITATION_PROBABILITY, timestamp, shouldUpdate=False - ) - ) - self.assertIsNotNone( - self.dwd_weather.get_forecast_data( - dwdforecast.WeatherDataType.PRECIPITATION_DURATION, timestamp, shouldUpdate=False - ) - )