Open Weather Map

I know there is already a component for OWM but it only returns forecast weather.

There are at least a few of us on here who have worked on garden irrigation systems and at least a few more who are re-using those projects.

Automating based on rainfall has proved (as far as I can tell) near on impossible unless you have an actual rain gauge.

The OWM api allows ‘Current weather Data’ to be collected ( one element of which is actual rainfall for the last 3 hours.


This would be perfect to use in irrigation projects. Is there any chance of having the component include this?

Now, I suspect that this might be something that a lot of you might be able to write your own component for but I am afraid, not I. Not yet at least :roll_eyes:

No, it doesn’t. The current data is available at least what we get from the API.

According to the code and the docs rain is already present.

So is ther monitored condition, rain, the volume of rain for the last 3 hours or that which is forecast for the next?

If it is indeed the former then that is great news (for me) and I apologise. But to be fair I had no way of knowing and I assumed the component focussed on forecasting.

I decided to check.

  - platform: openweathermap
    api_key: !secret owm_api_key
      - rain


Please tell me if I have misunderstood something?

I use the WUnderground component which has a variable that shows the precipitation for the whole day so far - would that be an option?

- platform: wunderground
    - precip_today_metric
    - precip_today_in

There are quite a few measuring points near me in addition to my own weather station.

Yes it would be perfect and I have been looking at that but for some reason it seems unreliable as shown here. Also I wasn’t sure if it was really precipitation so far i.e. an accumulation for the day? I thought as the graph can go down during the day it was more likely to be a forecast?

I saw your graph in another thread and it doesn’t make any sense to me :confused:

It’s also strange that it’s a dotted, not a solid line.
Maybe there’s an issue with the PWS you’re drawing the data from on WUnderground.
What does the chart on the WUnderground website show?
Should be at

But yes, from what I have seen, it really is accumulated precipitation since midnight.
Mine shows this for the time from April 5th to April 12th - you can see that it’s reset at midnight every day:

Unfortunately I cannot compare it with my graph in HAss because I’ve excluded it from the recorder/history - and it hasn’t rained here for more than a week.

Ok, thanks. Well at least it seems it is possible. I’ll investigate further and see what I can find. Now that I know it’s not a wild goose chase it will be worth getting to the bottom of it!
PS That other thread is the root of this one. It is where I posted my project and a couple of other people picked up on it. I had almost given up on sensible rain tracking but their interest got me back on it.

I am not much of a python reader, but this code seems to indicate that the 3 hour rain is being downloaded by the openweathermap component - see Line 147

It seems to be part of the forecast code though. However the API docs seem to show that from both the current weather and forecast APIs rain.3h gets the LAST 3 hours.

Search rain.3h in these pages and

Screw Wunderground, See

This converstation is in danger of getting lost in a mess of self-referring, cross-posting - and I am possibly most guilty :worried:

But, let’s make things worse:

I did a quick check. Apologies if you’ve seen this but I have lost track of who has read which posts and replied with what info. We really need a new thread :neutral_face: