Weather switch


Can someone tell me step by step instructions on how to add rules based on weather conditions to turn a switch on and off. It is confusing to me. Do I add a virtual device? At the wunderground site it say they no longer supply api’s. I not sure how to set this up from scratch.


You're using @Cobra 's updated weather switch?

See this post for information about how the API keys work now.


I am not using anything yet. I am very new to all of these custom codes, and apps. Can I get weather conditions from somewhere online to turn a sprinkler on and off with certain weather conditions to water my garden? I do not own a weather station.


Yes. You can create a free account at, get an API key and use this driver. It may or may not be accurate enough for you. Really depends on where you live, how far the nearest station for that service is and where you live. May not matter if your nearest station is miles away, but the weather is relatively the same between those locations.

I live near Lake Ontario and the weather changes are significant from the nearest station about 7 miles away, versus my station and the other stations near by.


I added that driver last night, and the temperature is several degrees off when compared to Wunderground. Is there any other api source, and driver I could use without buying my own PWS?


I'm sorry, but I don't have experience with anything else. Perhaps @Matthew can help. Weather Display works with Dark Sky, but I'm unfamiliar with it and it sounds like it needs data from your PWS, but maybe there's a way do it without.


Sorry, my driver does require your own PWS. DarkSky supplements that with forecast data and some options sensors (Solar Radiation/UV) but the main weather current data needs to come from your PWS through Weather-Display software. If you do not have a PWS that is using Weather-Display software then my driver is not for you.


I was able to get an api from a local wunderground PWS. I added the wunderground driver, but all I get is pending for the status.