naofireblade / homebridge-weather-plus

A comprehensive weather plugin for homebridge.
MIT License
313 stars 63 forks source link

RainBool threshold too strict for daily forecasts from DarkSky #103

Closed neominik closed 4 years ago

neominik commented 4 years ago

Thank you for this great plugin! I use the RainBool occupancy sensor for the today forecast from DarkSky to color a light in the morning from HomeKit. I noticed that it will indicate rain for most of the days, even if the weather is perfectly sunny.

In the code the rain amount seems to be compared to 0, but even on very sunny days, DarkSky will predict something like 0.08mm of rain in my location. I'm not sure what a reasonable threshold value would be, but 0 seems to be too strict. Maybe it should be configurable, like the thresholds for UV, Wind, AirPressure, etc.

naofireblade commented 4 years ago

Sure, I will add this asap.

naofireblade commented 4 years ago

I removed the rain treshold of > 0 for dark sky and only use the dark sky condition category now. Can you check if it works better for you or if you still need a customizable treshold?

neominik commented 4 years ago

Awesome! Will check if it is more reliable during the next week and report back in case it isn't.