Closed tobu480 closed 2 years ago
I can confirm this also happens with DarkSky (formerly ForecastIo) as the data source: rain is constantly reported as 0.
Confirming this is still happening with weatherbit.io on openhabian 2.5.12, I'm not set up as a developer, but can see the issue at https://github.com/openhab/openhab1-addons/blob/main/bundles/binding/org.openhab.binding.weather/src/main/java/org/openhab/binding/weather/internal/model/Precipitation.java
There is a typo 'percip' instead of 'precip' in line 37:
@Provider(name = ProviderName.WEATHERBIT, property = "percip") })
should read
@Provider(name = ProviderName.WEATHERBIT, property = "precip") })
Could someone who is set up as a developer update that? Is there any way I can update on my local machine until then? I've tried creating a pull request but because it's a V1 binding it's read-only, although it's still required on V2 for weather.
This issue has been mentioned on openHAB Community. There might be relevant details there:
https://community.openhab.org/t/weatherbit-type-precipitation-property-rain-not-working/100138/5
Closed as there will be no more fixes/enhancements for openHAB 2. If still valid for openHAB 3, please open a new issue with actuals logs.
Expected Behavior
Number WeatherRain “Rain [%.2f mm/h]” (gWeather) {weather=“locationId=home, type=precipitation, property=rain”} should receive updates like the other configured items
Current Behavior
WeatherRain is always 0 Assumtion (didn't check): same behavior also for forecast
Possible Solution
My assumption is that the internal mapping of the item to the API-call item "precip" (see below) isn't correct since there is no item "rain".
Steps to Reproduce (for Bugs)
I checked the API directly with the example below {“data”:[{“rh”:80,“pod”:“d”,“lon”:8.53333,“pres”:979.43,“timezone”:“Europe/Berlin”,“ob_time”:“2020-06-05 16:16”,“country_code”:“DE”,“clouds”:100,“ts”:1591373775,“solar_rad”:78.2525,“state_code”:“07”,“city_name”:“Bielefeld”,“wind_spd”:6.29415,“last_ob_time”:“2020-06-05T15:47:00”,“wind_cdir_full”:“west-southwest”,“wind_cdir”:“WSW”,“slp”:991.855,“vis”:24.135,“h_angle”:56.3,“sunset”:“19:40”,“dni”:669.37,“dewpt”:8.2,“snow”:0,“uv”:0.776824,“precip”:3.63158,“wind_dir”:240,“sunrise”:“03:11”,“ghi”:313.01,“dhi”:77.24,“aqi”:49,“lat”:52.03333,“weather”:{“icon”:“r01d”,“code”:“500”,“description”:“Light rain”},“datetime”:“2020-06-05:16”,“temp”:11.4,“station”:“E6958”,“elev_angle”:30.39,“app_temp”:11.4}],“count”:1}
As you can see there is no item called “rain” but only “precip” that seems to contain the “rain” value (see also documentation https://www.weatherbit.io/api/weather-current 1).
Context
Use the rain data in a rule.
Your Environment