I like to control a switch if the probability of rain is >60% . This probability number is to be taken from the local weather website. Based on the number, the switch will be turned "ON" or "OFF".
Is there app or any idea? BTW, which program is being use to write the script for Hubitat app?
Thanks in advance.
You'd have to write a 'Switch-like' Driver for that that polled the website and 'scraped' the value. Then set the switch to the correct state. Alternately you could make it 'dimmer like" and just directly deposit the scraped value. Then RM or an app can evaluate and set a virtual switch.
There's samples of how to poll a weather service (via API)
If there's an already built Driver to get Weather that actually has the data you want, I'd go with that. If the data is unreliable, or doesn't update often enough, then investing in writing one might be worth it. But I think I'd start as @Carl suggested and use AmbientWeather from @snell and see if it works for your needs.
This is how I do it using the Darksky weather app (although this will only work through to the end of 2021 when their API will close due to them having been bought out by Apple)...boo
It polls the weather service twice a day. At other times, I can request a weather update by pressing buttons. In these cases it reads the weather forecast to me using a Google Home device and sends me a notification with the weather summary. I also get a nice notification when the probability for rain tomorrow will be quite high. It works beautifully and I hope may give you ideas!
I will migrate to another weather service when I must
Requesting one more help. How can write a I script in Groovy Apache to turn a switch "ON" and turn "OFF" after 5 minutes? Specially I need help with time delay with certain hours. Is there any document available with syntax ? Thanks in advance.