bbernstein / homebridge-snowsense

Senses when it's "snowy", meaning it snowed recently or will likely snow soon
Apache License 2.0
4 stars 1 forks source link

Adjusted isSnowyEnough for inclusivity #2

Closed willnap closed 4 years ago

willnap commented 4 years ago

The Dark Sky API occasionally categorizes sub-freezing precipitation as neither snow nor sleet, thus not tripping the sensor despite snowy conditions. I adjusted isSnowyEnough to additionally return true if forecast.temperature is below 34° (approx. range) and forecast.precipProbability is inclusive.

In my testing, precipitation below 34° is snow-like and should trip its sensor, as it causes ice and snow buildup.