OpenWeatherMap question

Does anyone know (or know where I can find) the possible weather forecasts using OpenWeatherMap?

I'd like to do a custom attribute off the field below "weather: clear sky" to announce things, for example: "It's raining, close the windows".

image

I could probably use "contains rain", but knowing the options would be helpful, in case there are things like "thunderstorms" or "rain possible".

Nevermind... might have found it!
https://openweathermap.org/weather-conditions

1 Like

If anyone gets these codes, get out of Dodge...


1 Like

If anyone gets these codes, get out of Pompeii...

FTFY

1 Like

How to create custom attribute?

Are you just setting a bunch of IF conditions on the weather conditions somehow? Like using the weatherIcons as a proxy?

I honestly have moved the rule out of RM into Node Red. So this is going from memory.

I believe I used Rule Machine to create a text variable, and into that variable I stored the value from the attribute "weather" using "custom attribute" in Rule Machine.

Then as @Chris_C said, I had if-thens that said, if the variable contained "rain" or "thunderstorm" or "drizzle" or "snow" then announce "It is precipitating, consider closing the windows."

My original question wasn't really to figure out how to do it, I needed to find a list of all the possible states of "weather" so that I could make the rules.

I'm not sure if that answered your question.... if not, let me know.

2 Likes

Thank you! Now I know how to do it :slight_smile: