izacus / hass-swissweather

HomeAssistant module for MeteoSwiss
Apache License 2.0
13 stars 2 forks source link

Hourly forecast - precipitation always 0 #6

Closed Benschi99 closed 1 month ago

Benschi99 commented 2 months ago

First of all: Great integration. Thank you very much for your work.

I encountered one issue: Sadly the hourly forecast doesn't provide the correct precipitation. It's always showing as 0.

Example Daily forecast:

     - condition: rainy
      datetime: "2024-07-16T00:00:00"
      wind_bearing: null
      temperature: 24
      templow: 18
      precipitation: 8.8

Example Hourly forecast (same day):


    - condition: rainy
      datetime: "2024-07-16T00:00:00+00:00"
      wind_bearing: 195
      temperature: 19.4
      templow: 18.3
      wind_speed: 6.3
      precipitation: 0
    - condition: pouring
      datetime: "2024-07-16T01:00:00+00:00"
      wind_bearing: 195
      temperature: 18.6
      templow: 17.7
      wind_speed: 4.8
      precipitation: 0
    - condition: pouring
      datetime: "2024-07-16T02:00:00+00:00"
      wind_bearing: 195
      temperature: 18
      templow: 17.1
      wind_speed: 4.8
      precipitation: 0
    - condition: pouring
      datetime: "2024-07-16T03:00:00+00:00"
      wind_bearing: 195
      temperature: 17.6
      templow: 16.8
      wind_speed: 4.8
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T04:00:00+00:00"
      wind_bearing: 163
      temperature: 17.6
      templow: 16.7
      wind_speed: 4.5
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T05:00:00+00:00"
      wind_bearing: 163
      temperature: 17.9
      templow: 16.8
      wind_speed: 4.5
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T06:00:00+00:00"
      wind_bearing: 163
      temperature: 18.7
      templow: 17.1
      wind_speed: 4.5
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T07:00:00+00:00"
      wind_bearing: 43
      temperature: 19.8
      templow: 17.7
      wind_speed: 5.2
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T08:00:00+00:00"
      wind_bearing: 43
      temperature: 21.2
      templow: 18.4
      wind_speed: 5.2
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T09:00:00+00:00"
      wind_bearing: 43
      temperature: 22.5
      templow: 19.1
      wind_speed: 5.2
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T10:00:00+00:00"
      wind_bearing: 38
      temperature: 23.6
      templow: 19.8
      wind_speed: 10.1
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T11:00:00+00:00"
      wind_bearing: 38
      temperature: 24.3
      templow: 20.2
      wind_speed: 10.1
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T12:00:00+00:00"
      wind_bearing: 38
      temperature: 24.4
      templow: 20.4
      wind_speed: 10.1
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T13:00:00+00:00"
      wind_bearing: 35
      temperature: 24.1
      templow: 20.3
      wind_speed: 17.3
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T14:00:00+00:00"
      wind_bearing: 35
      temperature: 23.3
      templow: 20
      wind_speed: 17.3
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T15:00:00+00:00"
      wind_bearing: 35
      temperature: 22.3
      templow: 19.5
      wind_speed: 17.3
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T16:00:00+00:00"
      wind_bearing: 33
      temperature: 21.3
      templow: 18.9
      wind_speed: 13.4
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T17:00:00+00:00"
      wind_bearing: 33
      temperature: 20.3
      templow: 18.4
      wind_speed: 13.4
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T18:00:00+00:00"
      wind_bearing: 33
      temperature: 19.5
      templow: 17.9
      wind_speed: 13.4
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T19:00:00+00:00"
      wind_bearing: 42
      temperature: 18.8
      templow: 17.5
      wind_speed: 8.9
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T20:00:00+00:00"
      wind_bearing: 42
      temperature: 18.3
      templow: 17.2
      wind_speed: 8.9
      precipitation: 0
    - condition: rainy
      datetime: "2024-07-16T21:00:00+00:00"
      wind_bearing: 42
      temperature: 17.9
      templow: 16.9
      wind_speed: 8.9
      precipitation: 0
    - condition: cloudy
      datetime: "2024-07-16T22:00:00+00:00"
      wind_bearing: 31
      temperature: 17.6
      templow: 16.6
      wind_speed: 5.6
      precipitation: 0
    - condition: cloudy
      datetime: "2024-07-16T23:00:00+00:00"
      wind_bearing: 31
      temperature: 17.3
      templow: 16.4
      wind_speed: 5.6
      precipitation: 0
izacus commented 1 month ago

Can you please show debug level output for the module where the response from MeteoSwiss is visible? It's pretty common for their API to return 0 precipitation as forecast.

Benschi99 commented 1 month ago

You are indeed correct, the API returns 0 precipitation very often. Seems very odd to me if it rains the whole day and every hour there is 0 precipitation in the forecast. But you don't have any influence on that.

izacus commented 1 month ago

Maybe we should default to "precipitationMax" variable which tends to show larger numbers, but then I'm afraid it would be overestimating the probability :/