Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hourly forecast misses the condition #55

Open
badewanne1234 opened this issue Aug 25, 2024 · 2 comments
Open

Hourly forecast misses the condition #55

badewanne1234 opened this issue Aug 25, 2024 · 2 comments
Labels
enhancement New feature or request needs info More data is required to decide how to proceed

Comments

@badewanne1234
Copy link

The hourly forecast introduction is great but it misses the current condition, it provides
temp high, temp low and precipitation, but it misses the condition.

- datetime: '2024-08-25T09:00:00Z'
  temperature: 15.3
  templow: 14.1
  precipitation: 2.7

In contrast, the met.no forecast provides that plus additional attributes

- condition: rainy
  datetime: '2024-08-25T09:00:00+00:00'
  wind_bearing: 338.9
  cloud_coverage: 100
  temperature: 16.4
  wind_speed: 5.8
  precipitation: 0.7
  humidity: 98

Whilst wind_bearing, cloud_coverage and humidity are probably not offered by Meteo Schweiz, I would highly assume the current condition attribute itself would be offered by the API?

@Rudd-O Rudd-O added the needs info More data is required to decide how to proceed label Sep 8, 2024
@Rudd-O
Copy link
Owner

Rudd-O commented Sep 8, 2024

The API does not send the condition, very sorry.

             'regionHourlyForecast': [{'precipitationMax': 0.0,
                                        'precipitationMean': 0.0,
                                        'precipitationMin': 0.0,
                                        'temperatureMax': 22.0,
                                        'temperatureMean': 22.0,
                                        'temperatureMin': 22.0,
                                        'time': datetime.datetime(2024, 9, 7, 22, 0, tzinfo=datetime.timezone.utc)},
                                       {'precipitationMax': 0.0,
                                        'precipitationMean': 0.0,
                                        'precipitationMin': 0.0,
                                        'temperatureMax': 21.2,
                                        'temperatureMean': 21.2,
                                        'temperatureMin': 21.2,
                                        'time': datetime.datetime(2024, 9, 7, 23, 0, tzinfo=datetime.timezone.utc)},
                                       {'precipitationMax': 0.0,
                                        'precipitationMean': 0.0,
                                        'precipitationMin': 0.0,
                                        'temperatureMax': 20.5,
                                        'temperatureMean': 20.5,
                                        'temperatureMin': 20.5,
                                        'time': datetime.datetime(2024, 9, 8, 0, 0, tzinfo=datetime.timezone.utc)},
                                       {'precipitationMax': 0.0,
                                        'precipitationMean': 0.0,
                                        'precipitationMin': 0.0,
                                        'temperatureMax': 20.6,
                                        'temperatureMean': 20.6,
                                        'temperatureMin': 20.6,

We use API URL 'https://app-prod-ws.meteoswiss-app.ch/v1/forecast?plz=671000&graph_startLowResolution=true&warning=true' for obtaining the hourly forecast.

If you can find another API URL , please reopen with the necessary info.

@Rudd-O Rudd-O closed this as completed Sep 8, 2024
@Rudd-O
Copy link
Owner

Rudd-O commented Sep 8, 2024

We have found a different URL that provides the condition and the precipitation probability (for every three hours under precipitationProbability3h) as well as the condition (for every three hours under weatherIcon3h and weatherIcon3hV2):

https://app-prod-ws.meteoswiss-app.ch/v1/plzDetail?plz=390000

Sample data attached:

plzDetail.json

This is now a viable new feature that can be implemented. PRs against hamsclientfork and this integration welcome, because it's going to take me a few weeks to get this done myself.

@Rudd-O Rudd-O reopened this Sep 8, 2024
@Rudd-O Rudd-O added the enhancement New feature or request label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs info More data is required to decide how to proceed
Projects
None yet
Development

No branches or pull requests

2 participants